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
"System Columns":

"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:

"xmin

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.)"


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to