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\":

Поиск
Список
Период
Сортировка
От Hannu Krosing
Тема 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 1244118064.5442.1.camel@huvostro
обсуждение исходный текст
Ответ на 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
On Thu, 2009-06-04 at 11:58 +0000, 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. 

PostgreSQL itself does not consider byte sequences with embedded nulls
to be strings, as lot of its string-handling expects C strings

Use bytea type for "strings" with embedded nulls.


--
Hannu Krosing   http://www.2ndQuadrant.com
PostgreSQL Scalability and Availability
   Services, Consulting and Training


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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: Deadlock detection
Следующее
От: Thomas Finneid
Дата:
Сообщение: Re: COPY FROM STDIN support for JDK 1.6