bug in working with TEXT constants ?

From: sad <sad(at)bankir(dot)ru>
To: "psql" <pgsql-sql(at)postgresql(dot)org>
Subject: bug in working with TEXT constants ?
Date: 2003-10-28 11:53:54
Message-ID: 200310281153.54160.sad@bankir.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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?

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Theodore Petrosky 2003-10-28 13:00:52 Re: URGENT!!! changing Column size
Previous Message Kumar 2003-10-28 09:15:17 Re: Error message during compressed backup