Re: Different error messages executing CREATE TABLE or ALTER TABLE to create a column "xmin" - Mailing list pgsql-bugs

From Vik Reykja
Subject Re: Different error messages executing CREATE TABLE or ALTER TABLE to create a column "xmin"
Date
Msg-id CALDgxVv2CU4c2kpaRZmDTxfMT=HuyNLRYFGnnH13boPE4cw3Zg@mail.gmail.com
Whole thread Raw
In response to Re: Different error messages executing CREATE TABLE or ALTER TABLE to create a column "xmin"  (Marc Balmer <marc@msys.ch>)
Responses Re: Different error messages executing CREATE TABLE or ALTER TABLE to create a column "xmin"
List pgsql-bugs
On Mon, Jan 23, 2012 at 11:25, Marc Balmer <marc@msys.ch> wrote:

> Am 22.01.12 14:22, schrieb Giuseppe Sucameli:
> > test=> create table lx (xmin int);
> > ERROR:  column name "xmin" conflicts with a system
> > column name
> >
> > test=> create table lx (i int);
> > CREATE TABLE
> > test=> alter table lx add xmin int;
> > ERROR:  column "xmin" of relation "lx" already exists.
>
> That is not a bug, but a feature.
>

I see it as a message bug.  Why wouldn't ALTER TABLE also tell us that xmin
is a system column?  It makes things much more clear for newbies who don't
see the column yet are told it exists if they're also told it's a system
column.

I would try to cook up a patch but I have no skills :-(

pgsql-bugs by date:

Previous
From: Marc Balmer
Date:
Subject: Re: Different error messages executing CREATE TABLE or ALTER TABLE to create a column "xmin"
Next
From: Stefan Kaltenbrunner
Date:
Subject: pgcrypto decrypt_iv() issue