Skip site navigation (1) Skip section navigation (2)

Re: adding defaults

From: Rosser Schwarz <rosser(dot)schwarz(at)gmail(dot)com>
To: Jodi Kanter <jkanter(at)virginia(dot)edu>, pgsql-admin(at)postgresql(dot)org
Subject: Re: adding defaults
Date: 2004-07-14 17:11:51
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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 }



In response to

pgsql-admin by date

Next:From: Simon RiggsDate: 2004-07-14 19:33:40
Subject: Re: [HACKERS] Point in Time Recovery
Previous:From: Peter EisentrautDate: 2004-07-14 17:09:24
Subject: Re: adding defaults

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group