From: Oliver Elphick <olly@lfix.co.uk>
To: Jodi Kanter <jkanter@virginia.edu>
Cc: Postgres Admin List <pgsql-admin@postgresql.org>
Subject: Re: adding defaults
Date: Wed, 14 Jul 2004 17:52:21 +0100
Message-ID: <1089823941.29526.294.camel@linda> (raw)
In-Reply-To: <40F560AD.8030007@virginia.edu>
References: <40F560AD.8030007@virginia.edu>
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
--
Oliver Elphick olly@lfix.co.uk
Isle of Wight http://www.lfix.co.uk/oliver
GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0 5664 7A2F A543 10EA
========================================
"God is faithful, by whom ye were called unto the
fellowship of his Son Jesus Christ our Lord."
I Corinthians 1:9
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: olly@lfix.co.uk, jkanter@virginia.edu
Subject: Re: adding defaults
In-Reply-To: <1089823941.29526.294.camel@linda>
References: <40F560AD.8030007@virginia.edu> <1089823941.29526.294.camel@linda>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox