From: Bo?ena Potempa <Bozena.Potempa@otc.pl>
To: Hiroshi Inoue <Inoue@tpf.co.jp>
Cc: pgsql-odbc@postgresql.org
Subject: Re: PostgreSQL+ Beta bug?
Date: Mon, 18 Nov 2002 10:34:52 +0100
Message-ID: <MKEIIFDEFPOPHIPFIFJCIEEIDHAA.Bozena.Potempa@otc.pl> (raw)
In-Reply-To: <3DD5856B.75BC5788@tpf.co.jp>
>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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: Bozena.Potempa@otc.pl, Inoue@tpf.co.jp
Subject: Re: PostgreSQL+ Beta bug?
In-Reply-To: <MKEIIFDEFPOPHIPFIFJCIEEIDHAA.Bozena.Potempa@otc.pl>
References: <3DD5856B.75BC5788@tpf.co.jp> <MKEIIFDEFPOPHIPFIFJCIEEIDHAA.Bozena.Potempa@otc.pl>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox