Re: Get rid of system attributes in pg_attribute? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Get rid of system attributes in pg_attribute?
Date
Msg-id 9688.1109086343@sss.pgh.pa.us
Whole thread Raw
In response to Re: Get rid of system attributes in pg_attribute?  (Robert Treat <xzilla@users.sourceforge.net>)
Responses Re: Get rid of system attributes in pg_attribute?  (Robert Treat <xzilla@users.sourceforge.net>)
List pgsql-hackers
Robert Treat <xzilla@users.sourceforge.net> writes:
>>> Does anyone know of
>>> client code that actually pays attention to pg_attribute rows with
>>> negative attnums?

> Well, the corner case would be for those times when we use oid for updating 
> specific rows in a table, if a user creates there own oid column then you 
> could have trouble.   Actually we already have a safegaurd for this in 
> phppgadmin so we wont cause mistakes, it's just that those updates probably 
> won't work... others might not have been so thorough though. 

Anyone who's not checking that has been at risk ever since we invented
WITHOUT OIDS:

regression=# create table foo (oid text);
ERROR:  column name "oid" conflicts with a system column name
regression=# create table foo (oid text) without oids;
CREATE TABLE

Probably ctid is the more interesting case; I'm pretty sure ODBC relies
on ctid as a short-term-unique row identifier.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Christopher Kings-Lynne
Date:
Subject: Re: big problem
Next
From: Tom Lane
Date:
Subject: Re: big problem