Re: [PATCH] hstore: Fix parsing on Mac OS X: isspace() is locale specific - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [PATCH] hstore: Fix parsing on Mac OS X: isspace() is locale specific
Date
Msg-id ZH8aia7JfdPjTKAY@paquier.xyz
Whole thread Raw
In response to [PATCH] hstore: Fix parsing on Mac OS X: isspace() is locale specific  (Evan Jones <evan.jones@datadoghq.com>)
Responses Re: [PATCH] hstore: Fix parsing on Mac OS X: isspace() is locale specific
List pgsql-hackers
On Mon, Jun 05, 2023 at 11:26:56AM -0400, Evan Jones wrote:
> This patch fixes a rare parsing bug with unicode characters on Mac OS X.
> The problem is that isspace() on Mac OS X changes its behaviour with the
> locale. Use scanner_isspace instead, which only returns true for ASCII
> whitespace. It appears other places in the Postgres code have already run
> into this, since a number of places use scanner_isspace instead. However,
> there are still a lot of other calls to isspace(). I'll try to take a quick
> look to see if there might be other instances of this bug.

Indeed.  It looks like 9ae2661 missed this spot.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: Do we want a hashset type?
Next
From: Alexander Lakhin
Date:
Subject: Re: TRAP: FailedAssertion("prev_first_lsn < cur_txn->first_lsn", File: "reorderbuffer.c", Line: 927, PID: 568639)