pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove catalog function currtid()
Date: Wed, 25 Nov 2020 03:19:14 +0000
Message-ID: <E1khlKs-0007PW-Di@gemulon.postgresql.org> (raw)

Remove catalog function currtid()

currtid() and currtid2() are an undocumented set of functions whose sole
known user is the Postgres ODBC driver, able to retrieve the latest TID
version for a tuple given by the caller of those functions.

As used by Postgres ODBC, currtid() is a shortcut able to retrieve the
last TID loaded into a backend by passing an OID of 0 (magic value)
after a tuple insertion.  This is removed in this commit, as it became
obsolete after the driver began using "RETURNING ctid" with inserts, a
clause supported since Postgres 8.2 (using RETURNING is better for
performance anyway as it reduces the number of round-trips to the
backend).

currtid2() is still used by the driver, so this remains around for now.
Note that this function is kept in its original shape for backward
compatibility reasons.

Per discussion with many people, including Andres Freund, Peter
Eisentraut, Álvaro Herrera, Hiroshi Inoue, Tom Lane and myself.

Bump catalog version.

Discussion: https://postgr.es/m/20200603021448.GB89559@paquier.xyz

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/7b94e999606e2e2e10d68d544d49fc5a5d5785ac

Modified Files
--------------
src/backend/executor/nodeModifyTable.c |   3 -
src/backend/utils/adt/tid.c            | 137 +++++++++++++--------------------
src/include/access/heapam.h            |   1 -
src/include/catalog/catversion.h       |   2 +-
src/include/catalog/pg_proc.dat        |   3 -
src/test/regress/expected/tid.out      |  32 +-------
src/test/regress/sql/tid.sql           |  11 +--
7 files changed, 56 insertions(+), 133 deletions(-)



Message-ID: <E1khlKs-0007PW-Di@gemulon.postgresql.org>
Permalink:  ../E1khlKs-0007PW-Di@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1khlKs-0007PW-Di@gemulon.postgresql.org

 · 

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-committers@postgresql.org
  Cc: michael@paquier.xyz
  Subject: Re: pgsql: Remove catalog function currtid()
  In-Reply-To: <E1khlKs-0007PW-Di@gemulon.postgresql.org>
  References: <E1khlKs-0007PW-Di@gemulon.postgresql.org>

* 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