[ADMIN] adding defaults

2004-07-14 Thread Jodi Kanter
Can field specific defaults easily be added to a table that is already in existence and has data in it?  I cannot seem to locate the correct ALTER command in any of my books. Thanks Jodi -- ___ Jodi L Kanter BioInformatics Da

Re: [ADMIN] adding defaults

2004-07-14 Thread Oliver Elphick
On Wed, 2004-07-14 at 17:34, Jodi Kanter wrote: > Can field specific defaults easily be added to a table that is already > in existence and has data in it? I cannot seem to locate the correct > ALTER command in any of my books. ALTER TABLE table ALTER COLUMN column SET DEFAULT expression -- Oli

Re: [ADMIN] adding defaults

2004-07-14 Thread Peter Eisentraut
Jodi Kanter wrote: > Can field specific defaults easily be added to a table that is > already in existence and has data in it? I cannot seem to locate the > correct ALTER command in any of my books. ALTER TABLE a ALTER COLUMN b SET DEFAULT c; -- Peter Eisentraut http://developer.postgresql.org/

Re: [ADMIN] adding defaults

2004-07-14 Thread Rosser Schwarz
Jodi Kanter wrote: >Can field specific defaults easily be added to a table that is already >in existence and has data in it? I cannot seem to locate the correct >ALTER command in any of my books. $ psql -c "\h alter table" | grep -iC 1 default ALTER TABLE [ ONLY ] name [ * ] ALTER [ COLUMN