Re: Transition Tables doesn´t have OID

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: PegoraroF10 <marcos(at)f10(dot)com(dot)br>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Transition Tables doesn´t have OID
Date: 2018-12-01 14:14:30
Message-ID: 87pnull9k0.fsf@news-spur.riddles.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>>>>> "PegoraroF10" == PegoraroF10 <marcos(at)f10(dot)com(dot)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)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2018-12-01 14:30:24 Re: Process for populating tables in new database
Previous Message Rich Shepard 2018-12-01 14:09:55 Process for populating tables in new database