Re: psql blows up on BOM character sequence

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: psql blows up on BOM character sequence
Дата
Msg-id 5330FD2B.908@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: psql blows up on BOM character sequence  (Jim Nasby <jim@nasby.net>)
Список 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 по дате отправления:

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: [bug fix] PostgreSQL fails to start on Windows if it crashes after tablespace creation
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: psql blows up on BOM character sequence