\pset tuples_only on
\pset format unaligned
select 'now|' || to_char(now() at time zone 'Asia/Shanghai','YYYY-MM-DD HH24:MI:SS');
select 'tables|' || string_agg(table_name, ', ' order by table_name)
from information_schema.tables
where table_schema='public' and table_name in ('request_audit_logs','ops_error_logs','ops_system_logs','api_keys','users','accounts');
select 'ops_error_cols|' || string_agg(column_name || ':' || data_type, ', ' order by ordinal_position)
from information_schema.columns where table_schema='public' and table_name='ops_error_logs';
select 'request_audit_cols|' || string_agg(column_name || ':' || data_type, ', ' order by ordinal_position)
from information_schema.columns where table_schema='public' and table_name='request_audit_logs';
