Skip to content

Commit d50e3b1

Browse files
committed
Fix assertion in collation version lookup.
Commit 257836a 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.
1 parent 8cff66d commit d50e3b1

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/backend/utils/adt/pg_locale.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1731,15 +1731,14 @@ get_collation_actual_version(char collprovider, const char *collcollate)
17311731

17321732
/*
17331733
* Get provider-specific collation version string for a given collation OID.
1734-
* Return NULL if the provider doesn't support versions.
1734+
* Return NULL if the provider doesn't support versions, or the collation is
1735+
* unversioned (for example "C").
17351736
*/
17361737
char *
17371738
get_collation_version_for_oid(Oid oid)
17381739
{
17391740
HeapTuple tp;
1740-
char *version = NULL;
1741-
1742-
Assert(oid != C_COLLATION_OID && oid != POSIX_COLLATION_OID);
1741+
char *version;
17431742

17441743
if (oid == DEFAULT_COLLATION_OID)
17451744
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy