X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 7669CD1B545 for ; Tue, 28 Oct 2003 08:52:33 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 44940-09 for ; Tue, 28 Oct 2003 04:52:04 -0400 (AST) Received: from rock.spider.ru (rock.spider.ru [62.183.34.226]) by svr1.postgresql.org (Postfix) with ESMTP id F3060D1B544 for ; Tue, 28 Oct 2003 04:51:58 -0400 (AST) Received: from rock (localhost [127.0.0.1]) by rock (Postfix) with SMTP id E489D9142E for ; Tue, 28 Oct 2003 11:51:49 +0300 (MSK) Received: from sad.localnet.ru (sad.localnet.ru [10.0.0.33]) by rock.spider.ru (Postfix) with ESMTP id A31CA9142D for ; Tue, 28 Oct 2003 11:51:49 +0300 (MSK) Content-Type: text/plain; charset="us-ascii" From: sad Organization: IT To: "psql" Subject: bug in working with TEXT constants ? Date: Tue, 28 Oct 2003 11:53:54 +0000 User-Agent: KMail/1.4.3 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200310281153.54160.sad@bankir.ru> X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/355 X-Sequence-Number: 15755 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=20 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?=20