Received: from sss.pgh.pa.us ([192.204.191.242]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f9BGbHn10083 for ; Thu, 11 Oct 2001 12:37:17 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.4/8.11.4) with ESMTP id f9BGbEI10484; Thu, 11 Oct 2001 12:37:14 -0400 (EDT) To: =?iso-8859-1?Q?Rolf_L=FCttecke?= cc: pgsql-admin@postgresql.org Subject: Re: Alter column / array In-reply-to: <00f101c15224$0f952f20$8300a8c0@michaeltelecom.de> References: <00f101c15224$0f952f20$8300a8c0@michaeltelecom.de> Comments: In-reply-to =?iso-8859-1?Q?Rolf_L=FCttecke?= message dated "Thu, 11 Oct 2001 09:12:17 +0200" Date: Thu, 11 Oct 2001 12:37:14 -0400 Message-ID: <10481.1002818234@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200110/100 X-Sequence-Number: 2346 =?iso-8859-1?Q?Rolf_L=FCttecke?= writes: > I can't find out why the following command give different results: ALTER TABLE ADD COLUMN doesn't support adding a default. (There is a test in the code that's supposed to kick out an error message telling you so, but it doesn't seem to be working. Need to look at that.) You can use ALTER TABLE SET DEFAULT to add the default after you add the column. Hmm ... I wonder why ADD COLUMN doesn't just call the SET DEFAULT routine to handle adding the default ... regards, tom lane