SET DEFAULT

From: Archibald Zimonyi <archie(at)netg(dot)se>
To: pgsql-sql <pgsql-sql(at)postgresql(dot)org>
Subject: SET DEFAULT
Date: 2002-11-13 12:19:30
Message-ID: Pine.LNX.4.44.0211131316480.15540-100000@elvegris.netg.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


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;

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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Achilleus Mantzios 2002-11-13 12:38:01 Re: SET DEFAULT
Previous Message Christoph Haller 2002-11-13 12:09:15 Re: Passing OLD/NEW as composite type PL/PGSQL