Re: [GENERAL] Changing varchar length by manipulating pg_attribute

2016-01-13 Thread Jim Nasby
On 1/13/16 5:59 AM, Christian Ramseyer wrote: UPDATE pg_attribute SET atttypmod = 35+4 -- new desired length + 4 WHERE attrelid = 'TABLE1'::regclass AND attname = 'COL1'; I don't know of any reason that wouldn't work. Note that you might have to make the same change to all the views too.

[GENERAL] Changing varchar length by manipulating pg_attribute

2016-01-13 Thread Christian Ramseyer
Hi I have a database in which I'd like to increase the length of a varchar column. Unfortunately, the column is used in various views which then are used in other views, so doing this with ALTER TABLE ALTER COLUMN TYPE is quite a lot of work. I have found this suggestion