Re: Avoid a possible null pointer (src/backend/utils/adt/pg_locale.c) - Mailing list pgsql-hackers

From Ranier Vilela
Subject Re: Avoid a possible null pointer (src/backend/utils/adt/pg_locale.c)
Date
Msg-id CAEudQApQE3EnV3QiO-GP95LLs8MRby=cqxqe5+93P_EJRkB+Sw@mail.gmail.com
Whole thread Raw
In response to Re: Avoid a possible null pointer (src/backend/utils/adt/pg_locale.c)  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Avoid a possible null pointer (src/backend/utils/adt/pg_locale.c)
List pgsql-hackers
Em sex., 8 de set. de 2023 às 03:24, Michael Paquier <michael@paquier.xyz> escreveu:
On Wed, Sep 06, 2023 at 07:57:03AM -0300, Ranier Vilela wrote:
> I think no one objected.

Looking closer, there is much more inconsistency in this file
depending on the routine called.  How about something like the v2
attached instead to provide more context in the error message about
the function called?
+1
But as Jeff mentioned, when the locale is NULL, 
the provider is known to be COLLPROVIDER_LIBC.

I think we can use this to provide an error message,
when the locale is NULL.

What do you think about v3 attached?

best regards,
Ranier Vilela
Attachment

pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: proposal: psql: show current user in prompt
Next
From: Michael Paquier
Date:
Subject: Re: Avoid a possible null pointer (src/backend/utils/adt/pg_locale.c)