pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Hiroshi Inoue <Inoue@tpf.co.jp>
To: Bo?ena Potempa <Bozena.Potempa@otc.pl>
Cc: pgsql-odbc@postgresql.org
Subject: Re: PostgreSQL+ Beta bug?
Date: Mon, 18 Nov 2002 21:40:07 +0900
Message-ID: <EKEJJICOHDIEMGPNIFIJKEEBJMAA.Inoue@tpf.co.jp> (raw)
In-Reply-To: <MKEIIFDEFPOPHIPFIFJCIEEIDHAA.Bozena.Potempa@otc.pl>

> -----Original Message-----
> From: Bo?ena Potempa [mailto:Bozena.Potempa@otc.pl]
> 
> >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

Which version of PostgreSQL server are you connecting ?

Here I see all 0 i.e.

  select ascii(substring(fc,1,1)) from t; - 0
  select ascii(substring(fc,2,1)) from t; - 0
  select ascii(substring(fc,3,1)) from t; - 0

regards,
Hiroshi Inoue



view thread (13+ messages)  latest in thread

Message-ID: <EKEJJICOHDIEMGPNIFIJKEEBJMAA.Inoue@tpf.co.jp>
Permalink:  ../EKEJJICOHDIEMGPNIFIJKEEBJMAA.Inoue@tpf.co.jp/
Also on:    postgresql.org/message-id/EKEJJICOHDIEMGPNIFIJKEEBJMAA.Inoue@tpf.co.jp

 · 

reply

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: Inoue@tpf.co.jp, Bozena.Potempa@otc.pl
  Subject: Re: PostgreSQL+ Beta bug?
  In-Reply-To: <EKEJJICOHDIEMGPNIFIJKEEBJMAA.Inoue@tpf.co.jp>
  References: <MKEIIFDEFPOPHIPFIFJCIEEIDHAA.Bozena.Potempa@otc.pl> <EKEJJICOHDIEMGPNIFIJKEEBJMAA.Inoue@tpf.co.jp>

* 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