Re: Transition Tables doesn´t have OID - Mailing list pgsql-general

From Andrew Gierth
Subject Re: Transition Tables doesn´t have OID
Date
Msg-id 87pnull9k0.fsf@news-spur.riddles.org.uk
Whole thread Raw
In response to Transition Tables doesn´t have OID  (PegoraroF10 <marcos@f10.com.br>)
Responses Re: Transition Tables doesn´t have OID  (PegoraroF10 <marcos@f10.com.br>)
List pgsql-general
>>>>> "PegoraroF10" == PegoraroF10  <marcos@f10.com.br> writes:

 PegoraroF10> I would like to user OID value because we change our
 PegoraroF10> primary keys, sometimes, OID doesn´t.

"oid" as a special system column and the WITH OIDS option when creating
tables are being removed in pg12 (having been deprecated for something
like 12 years now), you might want to start thinking about alternatives.

 PegoraroF10> So, there is a way to get OID on transition tables ?

Well, arguably it is an oversight in the implementation of transition
tables that they were not added to the various places in the parser that
treat "oid" as a system column name. However, I not sure that you'll get
any agreement to fix that in light of the demise of "oid" as mentioned
above. (Not least because backpatching it could be dangerous in that it
could break queries that now work, by making "oid" an ambiguous column
reference.)

I tried various workarounds, but they were defeated by the fact that
evaluation of a whole-row Var does not copy the oid value (if any).
(I'm not sure if this ever really worked, so calling it a bug may be a
bit of a stretch.)

--
Andrew (irc:RhodiumToad)


pgsql-general by date:

Previous
From: Rich Shepard
Date:
Subject: Process for populating tables in new database
Next
From: Adrian Klaver
Date:
Subject: Re: Process for populating tables in new database