From: | Craig Ringer <craig(at)2ndquadrant(dot)com> |
---|---|
To: | Jim Nasby <jim(at)nasby(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Merlin Moncure <mmoncure(at)gmail(dot)com> |
Cc: | Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: psql blows up on BOM character sequence |
Date: | 2014-03-25 03:51:07 |
Message-ID: | 5330FD2B.908@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Craig Ringer | 2014-03-25 03:53:14 | Re: psql blows up on BOM character sequence |
Previous Message | Amit Kapila | 2014-03-25 03:32:17 | Re: [bug fix] PostgreSQL fails to start on Windows if it crashes after tablespace creation |