RE: Storing images in PG?

Поиск
Список
Период
Сортировка
От Andrew Snow
Тема RE: Storing images in PG?
Дата
Msg-id 000601c1266d$a751c810$fa01b5ca@avon
обсуждение исходный текст
Ответ на Re: Storing images in PG?  ("Joe Conway" <joseph.conway@home.com>)
Ответы Re: Storing images in PG?  (Jan Wieck <JanWieck@Yahoo.com>)
Список pgsql-general

> I have found (and confirmed by studying the PostgreSQL
> source) that to reliably insert arbitrary binary data into a
> bytea column there are only 3 characters which need to be
> escaped: \000, \047 ( ' ), \134 ( \ ). Here's the PHP
> function that I've been using:


Postgresl, in treating things as strings, handles \000 as NULL as an end
of string.

 select 'abc\000def' as hehehe;
 hehehe
--------
 abc
(1 row)


How do you get the data back from a query, with all the nulls in it?


- Andrew


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

Предыдущее
От: "Ben-Nes Michael"
Дата:
Сообщение: Re: Roll Back dont roll back counters
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: confused on maximum characters