pgsql: Database-level collation version tracking

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Database-level collation version tracking
Date: 2022-02-14 07:40:22
Message-ID: E1nJVyA-0003tZ-IP@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Database-level collation version tracking

This adds to database objects the same version tracking that collation
objects have. There is a new pg_database column datcollversion that
stores the version, a new function
pg_database_collation_actual_version() to get the version from the
operating system, and a new subcommand ALTER DATABASE ... REFRESH
COLLATION VERSION.

This was not originally added together with pg_collation.collversion,
since originally version tracking was only supported for ICU, and ICU
on a database-level is not currently supported. But we now have
version tracking for glibc (since PG13), FreeBSD (since PG14), and
Windows (since PG13), so this is useful to have now.

Reviewed-by: Julien Rouhaud <rjuju123(at)gmail(dot)com>
Discussion: https://www.postgresql.org/message-id/flat/f0ff3190-29a3-5b39-a179-fa32eee57db6%40enterprisedb.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/37851a8b83d3d57ca48736093b10aa5f3bc0c177

Modified Files
--------------
doc/src/sgml/catalogs.sgml | 11 ++
doc/src/sgml/func.sgml | 18 +++
doc/src/sgml/ref/alter_collation.sgml | 3 +-
doc/src/sgml/ref/alter_database.sgml | 12 ++
doc/src/sgml/ref/create_database.sgml | 21 +++
src/backend/commands/dbcommands.c | 194 ++++++++++++++++++++++-
src/backend/parser/gram.y | 6 +
src/backend/tcop/utility.c | 14 +-
src/backend/utils/init/postinit.c | 34 ++++
src/bin/initdb/initdb.c | 12 ++
src/bin/pg_dump/pg_dump.c | 21 +++
src/bin/psql/tab-complete.c | 2 +-
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_database.h | 3 +
src/include/catalog/pg_proc.dat | 5 +
src/include/commands/dbcommands.h | 1 +
src/include/nodes/nodes.h | 1 +
src/include/nodes/parsenodes.h | 6 +
src/test/regress/expected/collate.icu.utf8.out | 4 +
src/test/regress/expected/collate.linux.utf8.out | 4 +
src/test/regress/sql/collate.icu.utf8.sql | 4 +
src/test/regress/sql/collate.linux.utf8.sql | 4 +
22 files changed, 367 insertions(+), 15 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2022-02-14 08:16:30 pgsql: Add missing node support functions
Previous Message Peter Eisentraut 2022-02-14 06:29:45 pgsql: Improve correlation names in sanity tests