pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Rolf Lüttecke <rolf.luettecke@michael-telecom.de>
Cc: pgsql-admin@postgresql.org
Subject: Re: Alter column / array
Date: Thu, 11 Oct 2001 12:37:14 -0400
Message-ID: <10481.1002818234@sss.pgh.pa.us> (raw)
In-Reply-To: <00f101c15224$0f952f20$8300a8c0@michaeltelecom.de>
References: <00f101c15224$0f952f20$8300a8c0@michaeltelecom.de>

=?iso-8859-1?Q?Rolf_L=FCttecke?= <rolf.luettecke@michael-telecom.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



view thread (5+ messages)  latest in thread

Message-ID: <10481.1002818234@sss.pgh.pa.us>
Permalink:  ../10481.1002818234@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/10481.1002818234@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, rolf.luettecke@michael-telecom.de
  Subject: Re: Alter column / array
  In-Reply-To: <10481.1002818234@sss.pgh.pa.us>
  References: <00f101c15224$0f952f20$8300a8c0@michaeltelecom.de> <10481.1002818234@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox