Re: PostgreSQL+ Beta bug? - Mailing list pgsql-odbc

From Bo?ena Potempa
Subject Re: PostgreSQL+ Beta bug?
Date
Msg-id MKEIIFDEFPOPHIPFIFJCIEEIDHAA.Bozena.Potempa@otc.pl
Whole thread Raw
In response to Re: PostgreSQL+ Beta bug?  (Hiroshi Inoue <Inoue@tpf.co.jp>)
List pgsql-odbc
>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


pgsql-odbc by date:

Previous
From: Joan Picanyol i Puig
Date:
Subject: insert into view with a defined rule fails from MSAccess
Next
From: Jeff Eckermann
Date:
Subject: Re: insert into view with a defined rule fails from MSAccess