Re: ALTER TABLE ADD COLUMN column SERIAL -- unexpected results

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>, Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Rod Taylor <rbt(at)barchord(dot)com>, Hackers List <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER TABLE ADD COLUMN column SERIAL -- unexpected results
Date: 2001-11-28 04:06:48
Message-ID: 640.1006920408@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> I am trying to find a way to get this information to users. I have
> modified command.c to output a different error message:

> test=> alter table x add column z int default 4;
> ERROR: Adding columns with defaults is not implemented because it
> is unclear whether existing rows should have the DEFAULT value
> or NULL. Add the column, then use ALTER TABLE SET DEFAULT.
> You may then use UPDATE to give a non-NULL value to existing rows.

Kindly put the error message back as it was.

It's not "unclear" what the command should do; SQL92 is perfectly
clear about it.

I would also remind you that we've got quite a few sets of error message
translations in place now. Gratuitous changes to message wording in the
last week of beta are *not* appropriate, because they break all the
translations.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Lockhart 2001-11-28 04:16:35 Re: OpenBSD results for 7.2b3
Previous Message Thomas Lockhart 2001-11-28 03:56:57 Re: 7.2beta3 on Digital Alpha