From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: James Cloos <cloos@jhcloos.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: pg should ignore u+200b zero width space
Date: Wed, 11 Nov 2020 15:56:50 +0100
Message-ID: <739c79f3-ed87-f584-b209-d17318f7fdfe@enterprisedb.com> (raw)
In-Reply-To: <919181.1604415167@sss.pgh.pa.us>
References: <m3k0v21rss.fsf@carbon.jhcloos.org>
<e1c98248-ac7b-5fd2-0b74-86669054d58a@iki.fi>
<919181.1604415167@sss.pgh.pa.us>
On 2020-11-03 15:52, Tom Lane wrote:
> The difficulty with doing anything in this space --- whether it be
> ignoring, throwing an error, or whatever --- is that it makes the
> lexer's behavior encoding-sensitive and potentially locale-sensitive.
> That's problematic for all sorts of reasons. One of the worst is
> that frontend programs such as psql and ecpg also have SQL lexers,
> and there'd be no way to keep their behavior in precise sync with
> the backend's. (They might not even be running in the same encoding,
> never mind locale.) It might even be possible to build security
> holes around that; recall the fun we've had with trying to lock
> down quoting rules in encodings where backslash can be part of a
> multibyte character :-(.
I think we could support whitespace properly if we're using Unicode, and
use ASCII whitespace for all other encodings. The combinations to deal
with are finite. But it is a tricky problem that needs to be approached
with care.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: peter.eisentraut@enterprisedb.com, tgl@sss.pgh.pa.us, hlinnaka@iki.fi, cloos@jhcloos.com
Subject: Re: pg should ignore u+200b zero width space
In-Reply-To: <739c79f3-ed87-f584-b209-d17318f7fdfe@enterprisedb.com>
References: <m3k0v21rss.fsf@carbon.jhcloos.org> <e1c98248-ac7b-5fd2-0b74-86669054d58a@iki.fi> <919181.1604415167@sss.pgh.pa.us> <739c79f3-ed87-f584-b209-d17318f7fdfe@enterprisedb.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox