From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Rename pg_sequence_read_tuple() to pg_get_sequence_data()
Date: Thu, 29 Aug 2024 23:50:02 +0000
Message-ID: <E1sjotu-0022y7-Iw@gemulon.postgresql.org> (raw)
Rename pg_sequence_read_tuple() to pg_get_sequence_data()
This commit removes log_cnt from the tuple returned by the SQL function.
This field is an internal counter that tracks when a WAL record should
be generated for a sequence, and it is reset each time the sequence is
restored or recovered. It is not necessary to rebuild the sequence DDL
commands for pg_dump and pg_upgrade where this function is used. The
field can still be queried with a scan of the "table" created
under-the-hood for a sequence.
Issue noticed while hacking on a feature that can rely on this new
function rather than pg_sequence_last_value(), aimed at making sequence
computation more easily pluggable.
Bump catalog version.
Reviewed-by: Nathan Bossart
Discussion: https://postgr.es/m/Zsvka3r-y2ZoXAdH@paquier.xyz
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/a83a944e9fdd573802c82d961126ba07bfb65f98
Modified Files
--------------
src/backend/commands/sequence.c | 17 ++++++++---------
src/bin/pg_dump/pg_dump.c | 4 ++--
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_proc.dat | 8 ++++----
src/test/regress/expected/sequence.out | 10 +++++-----
src/test/regress/sql/sequence.sql | 4 ++--
6 files changed, 22 insertions(+), 23 deletions(-)
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 using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Rename pg_sequence_read_tuple() to pg_get_sequence_data()
In-Reply-To: <E1sjotu-0022y7-Iw@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