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 CAEudQAr6uCWQq2F-3pPJ+RO7btn4Mrr8opno-Cs-56wby0CQkQ@mail.gmail.com
Whole thread Raw
In response to Re: Avoid a possible null pointer (src/backend/utils/adt/pg_locale.c)  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Avoid a possible null pointer (src/backend/utils/adt/pg_locale.c)
List pgsql-hackers


Em sex., 1 de set. de 2023 às 17:17, Robert Haas <robertmhaas@gmail.com> escreveu:
On Fri, Sep 1, 2023 at 11:47 AM Ranier Vilela <ranier.vf@gmail.com> wrote:
> If a null locale is reached in these paths.
> elog will dereference a null pointer.

True. That's sloppy coding.

I don't know enough about this code to be sure whether the error
messages that you propose are for the best.
I tried to keep the same behavior as before.
Note that if the locale equals COLLPROVIDER_LIBC, 
the message to the user will be the same.

best regards,
Ranier Vilela

pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: Incremental View Maintenance, take 2
Next
From: Dilip Kumar
Date:
Subject: Re: Impact of checkpointer during pg_upgrade