Re: adding defaults - Mailing list pgsql-admin

From Rosser Schwarz
Subject Re: adding defaults
Date
Msg-id 37d451f704071410117a8cc088@mail.gmail.com
Whole thread Raw
In response to adding defaults  (Jodi Kanter <jkanter@virginia.edu>)
List pgsql-admin
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 ] column { SET DEFAULT expression | DROP DEFAULT }
...

/rls

--
:wq

pgsql-admin by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: adding defaults
Next
From: Simon Riggs
Date:
Subject: Re: [HACKERS] Point in Time Recovery