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 0528AD1B269 for ; Wed, 14 Jul 2004 14:12:23 -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 30573-04 for ; Wed, 14 Jul 2004 17:12:06 +0000 (GMT) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.195]) by svr1.postgresql.org (Postfix) with SMTP id BCCBBD1B23E for ; Wed, 14 Jul 2004 14:12:03 -0300 (ADT) Received: by mproxy.gmail.com with SMTP id d78so341146rnf for ; Wed, 14 Jul 2004 10:11:52 -0700 (PDT) Received: by 10.38.9.67 with SMTP id 67mr310392rni; Wed, 14 Jul 2004 10:11:51 -0700 (PDT) Message-ID: <37d451f704071410117a8cc088@mail.gmail.com> Date: Wed, 14 Jul 2004 12:11:51 -0500 From: Rosser Schwarz To: Jodi Kanter , pgsql-admin@postgresql.org Subject: Re: adding defaults In-Reply-To: <40F560AD.8030007@virginia.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <40F560AD.8030007@virginia.edu> 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/173 X-Sequence-Number: 14241 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