Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 96C60476878 for ; Wed, 13 Nov 2002 07:31:39 -0500 (EST) Received: from matrix.gatewaynet.com (unknown [217.19.69.50]) by postgresql.org (Postfix) with ESMTP id 4443347686C for ; Wed, 13 Nov 2002 07:31:38 -0500 (EST) Received: from localhost (achill@localhost) by matrix.gatewaynet.com (8.11.6/8.11.6) with ESMTP id gADCc1n09696; Wed, 13 Nov 2002 14:38:01 +0200 Date: Wed, 13 Nov 2002 14:38:01 +0200 (EET) From: Achilleus Mantzios To: Archibald Zimonyi Cc: pgsql-sql Subject: Re: SET DEFAULT In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/206 X-Sequence-Number: 10348 On Wed, 13 Nov 2002, Archibald Zimonyi wrote: > > Hi everyone, > > I have a problem with adding a column to an existing table. I want to add > a column named modified which is of datatype TIMESTAMP and has a DEFAULT > CURRENT_TIMESTAMP as it's initial value. I cannot do this with ALTER > TABLE, it tells me to user ALTER TABLE SET DEFAULT instead but I cannot > figure out the syntax with the help of the manuals. > > My ALTER TABLE looked like this: > > alter table decks add column modified timestamp default current_timestamp; ALTER TABLE decks alter column modified SET DEFAULT current_timestamp; > > and the error I get is this: > > ERROR: Adding columns with defaults is not implemented. > Add the column, then use ALTER TABLE SET DEFAULT. > > Thanks in advance, > > Archie > > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly > ================================================================== Achilleus Mantzios S/W Engineer IT dept Dynacom Tankers Mngmt Nikis 4, Glyfada Athens 16610 Greece tel: +30-10-8981112 fax: +30-10-8981877 email: achill@matrix.gatewaynet.com mantzios@softlab.ece.ntua.gr