pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Database-level collation version tracking
Date: Mon, 14 Feb 2022 07:40:22 +0000
Message-ID: <E1nJVyA-0003tZ-IP@gemulon.postgresql.org> (raw)

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@gmail.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(-)



view thread (3+ messages)  latest in thread

Message-ID: <E1nJVyA-0003tZ-IP@gemulon.postgresql.org>
Permalink:  ../E1nJVyA-0003tZ-IP@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1nJVyA-0003tZ-IP@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: peter@eisentraut.org
  Subject: Re: pgsql: Database-level collation version tracking
  In-Reply-To: <E1nJVyA-0003tZ-IP@gemulon.postgresql.org>
  References: <E1nJVyA-0003tZ-IP@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