pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Gierth <andrew@tao11.riddles.org.uk>
To: PegoraroF10 <marcos@f10.com.br>
Cc: pgsql-general@postgresql.org
Subject: Re: Transition Tables doesn´t have OID
Date: Sat, 01 Dec 2018 14:14:30 +0000
Message-ID: <87pnull9k0.fsf@news-spur.riddles.org.uk> (raw)
In-Reply-To: <1543666938082-0.post@n3.nabble.com>
References: <1543666938082-0.post@n3.nabble.com>

>>>>> "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)




view thread (9+ messages)  latest in thread

Message-ID: <87pnull9k0.fsf@news-spur.riddles.org.uk>
Permalink:  ../87pnull9k0.fsf@news-spur.riddles.org.uk/
Also on:    postgresql.org/message-id/87pnull9k0.fsf@news-spur.riddles.org.uk

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: andrew@tao11.riddles.org.uk, marcos@f10.com.br
  Subject: Re: Transition Tables doesn´t have OID
  In-Reply-To: <87pnull9k0.fsf@news-spur.riddles.org.uk>
  References: <1543666938082-0.post@n3.nabble.com> <87pnull9k0.fsf@news-spur.riddles.org.uk>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox