"Christopher Kings-Lynne" <[EMAIL PROTECTED]> writes: >> Hmm. Seems like that case, and the various ones involving adjustment of >> char/varchar length by hacking atttypmod, would be useful to support via >> ALTER COLUMN even if we don't have a full implementation. Essentially >> this would be taking the existing folklore about safe ways to hack >> pg_attribute and reducing them to code --- why not do it?
> Can you only reduce the length of a varchar (say) or can you actually > increase them as well? You can go either way. If you're reducing then in theory you should scan the column and make sure that no current values exceed the new limit. For char() as opposed to varchar(), you actually need to update the column to establish the correctly-padded new values. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster