Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 45CB347595A for ; Mon, 18 Nov 2002 04:35:32 -0500 (EST) Received: from ns.otc.pl (ns.otc.pl [62.233.151.194]) by postgresql.org (Postfix) with ESMTP id 606A24758BD for ; Mon, 18 Nov 2002 04:35:28 -0500 (EST) Received: from BOZENA ([62.233.151.193]) by ns.otc.pl (8.9.3/8.9.0) with SMTP id KAA09928; Mon, 18 Nov 2002 10:40:48 +0100 From: "Bo?ena Potempa" To: "Hiroshi Inoue" Cc: Subject: Re: PostgreSQL+ Beta bug? Date: Mon, 18 Nov 2002 10:34:52 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Importance: Normal In-Reply-To: <3DD5856B.75BC5788@tpf.co.jp> X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/86 X-Sequence-Number: 2263 >From: Hiroshi Inoue [mailto:Inoue@tpf.co.jp] >Sent: Saturday, November 16, 2002 12:38 AM [..] >As long as you are using text(char or varchar) type, you can't >store strings other than null terminated ones. >Please use BYTEA type instead and bind the parameter using >SQL_C_BINARY and SQL_VARBINARY. But that's true only in ODBC, so I think it _is_ a bug in ODBC driver. It is perfectly possible to store 0 in varchar or char fields. Please try from psql: INSERT INTO t values (chr(0)||chr(1)||chr(0)); and then check: select ascii(substring(fc,1,1)) from t; - 0 select ascii(substring(fc,2,1)) from t; - 1 select ascii(substring(fc,3,1)) from t; - 0 Works perfect! What do you think about this? Best reagards, Bozena Potempa