From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Record range constructor functions in pg_range
Date: Thu, 22 Jan 2026 15:07:15 +0000
Message-ID: <E1viwHC-0020yg-2e@gemulon.postgresql.org> (raw)
Record range constructor functions in pg_range
When a range type is created, several construction functions are also
created, two for the range type and three for the multirange type.
These have an internal dependency, so they "belong" to the range type.
But there was no way to identify those functions when given a range
type. An upcoming patch needs access to the two- or possibly the
three-argument range constructor function for a given range type. The
only way to do that would be with fragile workarounds like matching
names and argument types. The correct way to do that kind of thing is
to record to the links in the system catalogs. This is what this
patch does, it records the OIDs of these five constructor functions in
the pg_range catalog. (Currently, there is no code that makes use of
this.)
Reviewed-by: Paul A Jungwirth <pj@illuminatedcomputing.com>
Reviewed-by: Kirill Reshke <reshkekirill@gmail.com>
Discussion: https://www.postgresql.org/message-id/7d63ddfa-c735-4dfe-8c7a-4f1e2a621058%40eisentraut.org
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/c257ba83971892723c5c89955ab0dd1ef7c077d8
Modified Files
--------------
doc/src/sgml/catalogs.sgml | 54 ++++++++++++++++++++++++++++
src/backend/catalog/pg_range.c | 9 ++++-
src/backend/commands/typecmds.c | 48 ++++++++++++++++++-------
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_range.dat | 12 +++++++
src/include/catalog/pg_range.h | 13 ++++++-
src/test/regress/expected/oidjoins.out | 5 +++
src/test/regress/expected/type_sanity.out | 59 ++++++++++++++++++++++++++++++-
src/test/regress/sql/type_sanity.sql | 47 +++++++++++++++++++++++-
9 files changed, 231 insertions(+), 18 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: peter@eisentraut.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Record range constructor functions in pg_range
In-Reply-To: <E1viwHC-0020yg-2e@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