X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 06335D1B248 for ; Wed, 14 Jul 2004 13:52:34 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 22392-04 for ; Wed, 14 Jul 2004 16:52:28 +0000 (GMT) Received: from anchor-post-35.mail.demon.net (anchor-post-35.mail.demon.net [194.217.242.85]) by svr1.postgresql.org (Postfix) with ESMTP id 998EAD1B1CE for ; Wed, 14 Jul 2004 13:52:26 -0300 (ADT) Received: from lfix.demon.co.uk ([80.177.205.209] helo=cerberus.lfix.co.uk) by anchor-post-35.mail.demon.net with esmtp (Exim 3.35 #1) id 1Bkmza-0003sp-0Z; Wed, 14 Jul 2004 17:52:26 +0100 Received: from linda.lfix.co.uk ([192.168.1.1]) by cerberus.lfix.co.uk with esmtp (Exim 4.34) id 1BkmzV-0003rM-Ed; Wed, 14 Jul 2004 17:52:21 +0100 Subject: Re: adding defaults From: Oliver Elphick Reply-To: olly@lfix.co.uk To: Jodi Kanter Cc: Postgres Admin List In-Reply-To: <40F560AD.8030007@virginia.edu> References: <40F560AD.8030007@virginia.edu> Content-Type: text/plain Organization: LFIX Limited Message-Id: <1089823941.29526.294.camel@linda> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Wed, 14 Jul 2004 17:52:21 +0100 Content-Transfer-Encoding: 7bit X-LFIX-MailScanner: Found to be clean X-MailScanner-From: olly@lfix.co.uk X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200407/171 X-Sequence-Number: 14239 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