Re: [PATCH] hstore: Fix parsing on Mac OS X: isspace() is locale specific

From: Evan Jones <evan(dot)jones(at)datadoghq(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] hstore: Fix parsing on Mac OS X: isspace() is locale specific
Date: 2023-06-20 13:04:26
Message-ID: CA+HWA9ZRRxdL5FFTM4eTDyhmnzC-0tAo1kmu8Mndtjvs4O=G0Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thanks for the detailed discussion. To confirm that I've understood
everything:

* Michael's proposed patch to add hstore_isspace() would be a potential
fix: it resolves my original bug, and does not change the behavior of '\v'.
* We believe the change to '\v' is not a problem, and may be an improvement
because it now follows the "core" Postgres parser.

In conclusion: we don't need to make an additional change. Thank you all
for investigating!

My one last suggestion: We *could* revert the backpatching if we are
concerned about this change, but I'm not personally sure that is necessary.
As we discussed, this is an unusual corner case in an "extension" type that
many won't even have enabled.

Evan

On Tue, Jun 20, 2023 at 2:02 AM Michael Paquier <michael(at)paquier(dot)xyz> wrote:

> On Sun, Jun 18, 2023 at 09:10:59PM -0400, Tom Lane wrote:
> > What have you got in mind? We should already have validated encoding
> > correctness before the text ever gets to hstore_in, and I'm not clear
> > what additional checks would be useful.
>
> I was staring at the hstore parsing code and got the impression that
> multi-byte character handling could be improved, but looking closer it
> seems that I got that wrong. Apologies for the noise.
> --
> Michael
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2023-06-20 13:08:36 Re: run pgindent on a regular basis / scripted manner
Previous Message Tomas Vondra 2023-06-20 12:23:29 Re: Do we want a hashset type?