Skip site navigation (1) Skip section navigation (2)

Re: Different error messages executing CREATE TABLE or ALTER TABLE to create a column "xmin"

From: Giuseppe Sucameli <brush(dot)tyler(at)gmail(dot)com>
To: Marc Balmer <marc(at)msys(dot)ch>
Cc: Vik Reykja <vikreykja(at)gmail(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Different error messages executing CREATE TABLE or ALTER TABLE to create a column "xmin"
Date: 2012-01-24 13:41:56
Message-ID: CAA6k8-LSMiYAQyUCNKs7MOSOOiLPFj4c9Ai2zFkCREROcK3oAQ@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-hackers
Hi Marc,

On Mon, Jan 23, 2012 at 3:04 PM, Vik Reykja <vikreykja(at)gmail(dot)com> wrote:
> On Mon, Jan 23, 2012 at 11:25, Marc Balmer <marc(at)msys(dot)ch> wrote:
>>
>> Am 22.01.12 14:22, schrieb Giuseppe Sucameli:
>> > 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 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.

-- 
Giuseppe Sucameli

In response to

Responses

pgsql-hackers by date

Next:From: Robert HaasDate: 2012-01-24 13:58:58
Subject: Re: basic pgbench runs with various performance-related patches
Previous:From: Heikki LinnakangasDate: 2012-01-24 12:38:04
Subject: Re: Client Messages

pgsql-bugs by date

Next:From: Giuseppe SucameliDate: 2012-01-24 14:10:48
Subject: Different error messages executing CREATE TABLE or ALTER TABLE to create a column "xmin"
Previous:From: Andrew AlcheyevDate: 2012-01-24 12:59:10
Subject: Re: FreeBSD 9.0/amd64, PostgreSQL 9.1.2, pgbouncer 1.4.2: segmentation fault

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group