1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Use libc version as a collation version on glibc systems.

Using glibc's version string to detect potential collation definition
changes is not 100% reliable, but it's better than nothing.  Currently
this affects only collations explicitly provided by "libc".  More work
will be needed to handle the default collation.

Author: Thomas Munro, based on a suggestion from Christoph Berg
Reviewed-by: Peter Eisentraut
Discussion: https://postgr.es/m/4b76c6d4-ae5e-0dc6-7d0d-b5c796a07e34%402ndquadrant.com
This commit is contained in:
Thomas Munro
2019-10-16 16:51:40 +13:00
parent 4351142e58
commit d5ac14f9cc
3 changed files with 24 additions and 4 deletions

View File

@ -129,6 +129,16 @@ HINT: Rebuild all objects affected by this collation and run ALTER COLLATION pg
does not actually check whether all affected objects have been rebuilt
correctly.
</para>
<para>
When using collations provided by <literal>libc</literal> and
<productname>PostgreSQL</productname> was built with the GNU C library, the
C library's version is used as a collation version. Since collation
definitions typically change only with GNU C library releases, this provides
some defense against corruption, but it is not completely reliable.
</para>
<para>
Currently, there is no version tracking for the database default collation.
</para>
<para>
The following query can be used to identify all collations in the current