Re: psql blows up on BOM character sequence - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: psql blows up on BOM character sequence
Date
Msg-id 5330FD2B.908@2ndquadrant.com
Whole thread Raw
In response to Re: psql blows up on BOM character sequence  (Jim Nasby <jim@nasby.net>)
List pgsql-hackers
On 03/25/2014 02:50 AM, Jim Nasby wrote:
> So instead of trying to handle this on the psql side[1], I think we need
> to handle it in the backend; specifically in the parser. Is there an
> easy way to get the parser to ignore the BOM character in the context of
> commands (but not in strings)?

I disagree. The server deals with SQL statements and client data
streams, it doesn't deal with files.

The BOM is an artifact of *files*. You don't expect to see a BOM in a
UTF-8 string passed to a function call in a library; nor should you
expect one to be passed to you on a network protocol that isn't about
exchanging files.

-- Craig Ringer                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: [bug fix] PostgreSQL fails to start on Windows if it crashes after tablespace creation
Next
From: Craig Ringer
Date:
Subject: Re: psql blows up on BOM character sequence