Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT format(
- 'ALTER TABLE %I.%I.%I ALTER COLUMN %I SET DATA TYPE int;',
- table_catalog,
- table_schema,
- table_name,
- column_name
- )
- FROM information_schema.columns
- WHERE data_type = 'bigint'
- AND table_schema <> 'pg_catalog';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement