Re: Strings with null characters produce exceptions when selectedor inserted. Attempts to select messages with null bytes produces "ERROR:insufficient data left in message". And inserting produces "ERROR: invalidbyte sequence for encoding \"UTF8\":

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: Strings with null characters produce exceptions when selectedor inserted. Attempts to select messages with null bytes produces "ERROR:insufficient data left in message". And inserting produces "ERROR: invalidbyte sequence for encoding \"UTF8\":
Дата
Msg-id 4A27CAB0.4040605@opencloud.com
обсуждение исходный текст
Ответ на Re: Strings with null characters produce exceptions when selectedor inserted. Attempts to select messages with null bytes produces "ERROR:insufficient data left in message". And inserting produces "ERROR: invalidbyte sequence for encoding \"UTF8\":  ("John Lister" <john.lister@kickstone.com>)
Список pgsql-jdbc
John Lister wrote:
> Apologies for top post using a blackberry. The binary mode should be able to cope fine as it passes the length before
sendingthe data. Should be straightforward to add strings to patch. 

It's not that we can't transfer strings with embedded zero bytes to the
server (we can), it's that the server does not handle the resulting
string. From memory it just truncates the string at that point. So we
disallow it in the driver rather than causing strange effects on the
server side.

So adding support for these strings to the binary patch would actually
be a regression.

-O

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: "John Lister"
Дата:
Сообщение: Re: Strings with null characters produce exceptions when selectedor inserted. Attempts to select messages with null bytes produces "ERROR:insufficient data left in message". And inserting produces "ERROR: invalidbyte sequence for encoding \"UTF8\":
Следующее
От: "Peirong Feng (pefeng)"
Дата:
Сообщение: how to modify connection socket timeout