PostgreeSQL : How change the size of one column ?

UPDATE pg_attribute 
    SET atttypmod = (your new size) + 4
WHERE attrelid = '(table name)'::regclass
    AND attname = '(column name)';

No worry about the number 4. Exist some reasons for it, only use and you will be fine.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s