Re: Alter column / array

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Rolf Lüttecke <rolf(dot)luettecke(at)michael-telecom(dot)de>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Alter column / array
Date: 2001-10-11 16:37:14
Message-ID: 10481.1002818234@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

=?iso-8859-1?Q?Rolf_L=FCttecke?= <rolf(dot)luettecke(at)michael-telecom(dot)de> 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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2001-10-11 16:39:01 Re: how to create function/procedure for commenting multiple objects (e.g., columns)
Previous Message Heitzso 2001-10-11 12:57:18 re logging, how does one cleanup the write ahead and other logs