postgresql system column errors
Hello Hiroshi,
When I try to use the column name xmin in one of my tables I get
ERROR: column name "xmin" conflicts with a system column name
You seem to have been affected by these errors in the past too. Had you
found a solution?
Anybody else have any solutions?
Cheers,
ashish
Ashish Mahabal, Caltech Astronomy, Pasadena, CA 91125
http://www.astro.caltech.edu/~aam aam@astro.caltech.edu
Colorless green ideas sleep furiously.
Ashish Mahabal wrote:
Hello Hiroshi,
When I try to use the column name xmin in one of my tables I get
ERROR: column name "xmin" conflicts with a system column nameYou seem to have been affected by these errors in the past too. Had you
found a solution?Anybody else have any solutions?
The only thing you can do is change your column name.
The manual tells you about the system columns here:
http://www.postgresql.org/docs/7.4/static/ddl-system-columns.html
--
Mark Gibson <gibsonm |AT| cromwell |DOT| co |DOT| uk>
Web Developer & Database Admin
Cromwell Tools Ltd.
Leicester, England.
Hello
I have got an inhouse application which used to
connect to MySQL using their C API, which is now being
ported to PostGreSQL :)
Is there any reference to PGSQL C API() in one page. I
went thru the docs but they are divided into multiple
HTMLs which is kinda difficult for me to take a
printout.
Any pointers.....???
Also in MySQL, the structure of resultset returned by
MySQL goes thru lot of changes with version so there
is always a possibilty of application crashing if we
refer to wrong index.....does postgresql suffer from
same problem...i have gone thru the api and having a
simple knack of it but not much :)
regards
karam
__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html
Karam Chand <karam_chand03@yahoo.com> writes:
Is there any reference to PGSQL C API() in one page.
You probably want to read the libpq chapter.
http://www.postgresql.org/docs/7.4/static/libpq.html
The first three or so sections cover everything you
really need to know about.
regards, tom lane
Well...I have read that....just thought there might be
documentation in one page...
Karam
--- Tom Lane <tgl@sss.pgh.pa.us> wrote:
Karam Chand <karam_chand03@yahoo.com> writes:
Is there any reference to PGSQL C API() in one
page.
You probably want to read the libpq chapter.
http://www.postgresql.org/docs/7.4/static/libpq.html
The first three or so sections cover everything you
really need to know about.regards, tom lane
__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html
Thanx Mark.
Thats what I ended up doing. But it seems silly that the name space for
system columns and user columns are not separate. Its just like saying
that you can not have the same column name in 2 different tables.
Just like I can say table1.myCol and table2.myCol, there should have been
a way to say system.xmin and myTable.xmin, the default being myTable.xmin
when I am doing stuff with myTable. Whereever xmin gets used currently,
the source could explicitely say system.xmin. Anyway. hope that is done in
some future version.
Cheers,
-ashish
On Mon, 16 Feb 2004, Mark Gibson wrote:
Ashish Mahabal wrote:
Hello Hiroshi,
When I try to use the column name xmin in one of my tables I get
ERROR: column name "xmin" conflicts with a system column nameYou seem to have been affected by these errors in the past too. Had you
found a solution?Anybody else have any solutions?
The only thing you can do is change your column name.
The manual tells you about the system columns here:
http://www.postgresql.org/docs/7.4/static/ddl-system-columns.html--
Mark Gibson <gibsonm |AT| cromwell |DOT| co |DOT| uk>
Web Developer & Database Admin
Cromwell Tools Ltd.
Leicester, England.
Ashish Mahabal, Caltech Astronomy, Pasadena, CA 91125
http://www.astro.caltech.edu/~aam aam@astro.caltech.edu
"Alcohol and calculus don't mix. Never drink and derive."
On Tue, Feb 17, 2004 at 11:15:13AM -0800, Ashish Mahabal wrote:
Thanx Mark.
Thats what I ended up doing. But it seems silly that the name space for
system columns and user columns are not separate. Its just like saying
that you can not have the same column name in 2 different tables.Just like I can say table1.myCol and table2.myCol, there should have been
a way to say system.xmin and myTable.xmin, the default being myTable.xmin
when I am doing stuff with myTable. Whereever xmin gets used currently,
the source could explicitely say system.xmin. Anyway. hope that is done in
some future version.
I think you're missing something. Every table has the xmin, xmax, cmin, cmax
and sometimes oid columns. They're not only in the system tables. These
columns are what makes transactions work and they exist for every record.
I hope you're not suggesting a move to myTable.system.xmin ?
Pick a table and do: select xmin,xmax,cmin,cmax from <table>
What you're asking is to have the same column name twice in a single table,
which is obviously silly.
--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/
Show quoted text
If the Catholic church can survive the printing press, science fiction
will certainly weather the advent of bookwarez.
http://craphound.com/ebooksneitherenorbooks.txt - Cory Doctorow