BEGIN READ ONLY;
\pset tuples_only on
\pset format unaligned
SELECT json_build_object('kind','now','now_shanghai',to_char(now() at time zone 'Asia/Shanghai','YYYY-MM-DD HH24:MI:SS'))::text;
SELECT json_build_object('kind','columns','table',table_name,'columns',json_agg(column_name ORDER BY ordinal_position))::text
FROM information_schema.columns
WHERE table_schema='public' AND table_name IN ('users','api_keys','groups','ops_error_logs','subscriptions','subscription_plans','user_allowed_groups')
GROUP BY table_name
ORDER BY table_name;
COMMIT;
