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

From Giuseppe Sucameli
Subject Re: Different error messages executing CREATE TABLE or ALTER TABLE to create a column "xmin"
Date
Msg-id CAA6k8-LSMiYAQyUCNKs7MOSOOiLPFj4c9Ai2zFkCREROcK3oAQ@mail.gmail.com
Whole thread Raw
In response to Re: Different error messages executing CREATE TABLE or ALTER TABLE to create a column "xmin"  (Vik Reykja <vikreykja@gmail.com>)
Responses Re: Different error messages executing CREATE TABLE or ALTER TABLE to create a column "xmin"  (Vik Reykja <vikreykja@gmail.com>)
List pgsql-bugs
Hi Marc,

On Mon, Jan 23, 2012 at 3:04 PM, Vik Reykja <vikreykja@gmail.com> wrote:
> On Mon, Jan 23, 2012 at 11:25, Marc Balmer <marc@msys.ch> wrote:
>>
>> Am 22.01.12 14:22, schrieb Giuseppe Sucameli:
>> > test=3D> create table lx (i int);
>> > CREATE TABLE
>> > test=3D> alter table lx add xmin int;
>> > ERROR: =A0column "xmin" of relation "lx" already exists.
>>
>> That is not a bug, but a feature.
>
> I see it as a message bug.=A0 Why wouldn't ALTER TABLE also tell us that =
xmin
> is a system column?=A0 It makes things much more clear for newbies who do=
n't
> see the column yet are told it exists if they're also told it's a system
> column.

I agree with Vik, the CREATE TABLE tells "xmin" is a system column,
why wouldn't ALTER TABLE do the same?

This would be a feature if CREATE TABLE didn't tell us that
xmin is a system column, otherwise is a bug.

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

I'm going to write a patch to fix this problem.
Regards.

--=20
Giuseppe Sucameli

pgsql-bugs by date:

Previous
From: Andrew Alcheyev
Date:
Subject: Re: FreeBSD 9.0/amd64, PostgreSQL 9.1.2, pgbouncer 1.4.2: segmentation fault
Next
From: Phil Sorber
Date:
Subject: Re: Segfault in backend CTE code