Am 22.01.12 14:22, schrieb Giuseppe Sucameli:
> Hi all,
> trying to create a table with a column xmin I get the
> following error message:
> test=> create table lx (xmin int);
> ERROR: column name "xmin" conflicts with a system
> column name
> Instead I get a different (and less understandable) error
> message if I try to add a column named xmin to an
> existent table:
> test=> create table lx (i int);
> CREATE TABLE
> test=> alter table lx add xmin int;
> ERROR: column "xmin" of relation "lx" already exists.
> The same problem occurs using "xmax" as column name.
> I'm on Ubuntu 11.04.
> Tried on both PostgreSQL 8.4.10 and 9.1.2
That is not a bug, but a feature. See section 5.4 of the documentation
"Every table has several system columns that are implicitly defined by
the system. Therefore, these names cannot be used as names of
user-defined columns. (Note that these restrictions are separate from
whether the name is a key word or not; quoting a name will not allow you
to escape these restrictions.) You do not really need to be concerned
about these columns; just know they exist."
and further down:
The identity (transaction ID) of the inserting transaction for this row
version. (A row version is an individual state of a row; each update of
a row creates a new row version for the same logical row.)"
In response to
pgsql-hackers by date
|Next:||From: Fujii Masao||Date: 2012-01-23 10:29:20|
|Subject: Re: Online base backup from the hot-standby|
|Previous:||From: pratikchirania||Date: 2012-01-23 10:09:12|
|Subject: Re: pgstat wait timeout|
pgsql-bugs by date
|Next:||From: Vik Reykja||Date: 2012-01-23 14:04:27|
|Subject: Re: Different error messages executing CREATE TABLE or ALTER
TABLE to create a column "xmin"|
|Previous:||From: Guillaume Lelarge||Date: 2012-01-23 09:54:10|
|Subject: Re: BUG #6406: Included pgAdmin does not have .sql file