bug in working with TEXT constants ?

Поиск
Список
Период
Сортировка
От sad
Тема bug in working with TEXT constants ?
Дата
Msg-id 200310281153.54160.sad@bankir.ru
обсуждение исходный текст
Ответы Re: bug in working with TEXT constants ?  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Re: bug in working with TEXT constants ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
Good day.

AFAIK PostgreSQL provides the type TEXT with 4-byte prefix length
which is distinct to C's zero-terminated  (char *)
That's very good.
Then I expect natural possibility to store texts having zero characters.

try
SELECT 'abc\0de';
SELECT length('abc\0de');
or insert such a value into another table and then select....

you'll see a classical result just like you are using (char *).
i suppose it is a little bug deep inside like using a memcpy() or such...

Am i wrong?



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

Предыдущее
От: George Essig
Дата:
Сообщение: Re: connectby
Следующее
От: "Kumar"
Дата:
Сообщение: Using % type in Parameters