Alter Postgres Tables via metadata
(Thanks Louis R.)
select atttypmod from pg_attribute where attrelid = 'TABLE1'::regclass and attname = 'title';
# then
update pg_attribute set atttypmod = 200+4 where attrelid = 'TABLE1'::regclass and attname = 'title';
http://sniptools.com/databases/resize-a-column-in-a-postgresql-table-without-changing-data
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment