Re: Updating OID column - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Updating OID column
Date
Msg-id 26180.1144682969@sss.pgh.pa.us
Whole thread Raw
In response to Re: Updating OID column  (Martijn van Oosterhout <kleptog@svana.org>)
Responses Re: Updating OID column
List pgsql-hackers
Martijn van Oosterhout <kleptog@svana.org> writes:
> On Mon, Apr 10, 2006 at 04:40:50PM +0800, Qingqing Zhou wrote:
>> AFAIK if two rows are with the same OID, we will think these two rows are
>> different versions of the same tuple. So if we allow users to change OID
>> columns, we may encounter some inconsistency.

> Hardly, OIDs are optional anyway these days. We only guarentee that
> OIDs will be unique if you have a unique index on them, so I imagine
> the only reason it hasn't happened yet is because nobody's coded it.

Right.  I looked at this awhile back, though, and found multiple places
that would break if you tried it :-( --- mainly assumptions about the
meaning of resno in target lists.  (The comments for the TargetEntry
struct give some but not all of the details.)  Given that OID is
semi-deprecated anyway these days, it's not clear it's worth fixing.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Richard Huxton
Date:
Subject: Re: Get explain output of postgresql in Tables
Next
From: Peter Eisentraut
Date:
Subject: Re: Updating OID column