Re: encoding question

Поиск
Список
Период
Сортировка
От Hannu Krosing
Тема Re: encoding question
Дата
Msg-id 1060245807.3042.4.camel@fuji.krosing.net
обсуждение исходный текст
Ответ на encoding question  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
Список pgsql-hackers
Christopher Kings-Lynne kirjutas N, 07.08.2003 kell 04:33:
> My other question is we play around with bytea fields to escape nulls and
> chars < 32 and stuff so that when someone browses the table, they get
> '\000<unknown>\000...', etc.

actually bytea *stores* char(0), you get \000 or \x0 or ¬@ or whatever
depending on whatever you use for displaying it.

the escaping i's done only to fit the data into a SQL statement when
inserting the data into the database. select returns straight bytes from
bytea.

>   However, are the other field types for which
> we have to do this?  Can you put nulls and stuff in text/varchar/char
> fields?

No. Nulls are not allowed in text/varchar fields.

-------------
Hannu



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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: ecpg thread test program
Следующее
От: "Jinqiang Han"
Дата:
Сообщение: PITR in 7.4