mirror of
https://github.com/postgres/postgres.git
synced 2025-06-16 06:01:02 +03:00
Fix assertion in collation version lookup.
Commit 257836a7
included an assertion that a version lookup routine is
not trying to look up "C" or "POSIX", but that case is reachable with
the user-facing SQL function pg_collation_actual_version(). Remove the
assertion.
This commit is contained in:
@ -1731,15 +1731,14 @@ get_collation_actual_version(char collprovider, const char *collcollate)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Get provider-specific collation version string for a given collation OID.
|
* Get provider-specific collation version string for a given collation OID.
|
||||||
* Return NULL if the provider doesn't support versions.
|
* Return NULL if the provider doesn't support versions, or the collation is
|
||||||
|
* unversioned (for example "C").
|
||||||
*/
|
*/
|
||||||
char *
|
char *
|
||||||
get_collation_version_for_oid(Oid oid)
|
get_collation_version_for_oid(Oid oid)
|
||||||
{
|
{
|
||||||
HeapTuple tp;
|
HeapTuple tp;
|
||||||
char *version = NULL;
|
char *version;
|
||||||
|
|
||||||
Assert(oid != C_COLLATION_OID && oid != POSIX_COLLATION_OID);
|
|
||||||
|
|
||||||
if (oid == DEFAULT_COLLATION_OID)
|
if (oid == DEFAULT_COLLATION_OID)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user