Re: [PROPOSAL]a new data type 'bytea' for ECPG - Mailing list pgsql-hackers

From Michael Meskes
Subject Re: [PROPOSAL]a new data type 'bytea' for ECPG
Date
Msg-id c13f256231e686de27cba1664a3d527915a18b36.camel@postgresql.org
Whole thread Raw
In response to [PROPOSAL]a new data type 'bytea' for ECPG  ("Matsumura, Ryo" <matsumura.ryo@jp.fujitsu.com>)
Responses RE: [PROPOSAL]a new data type 'bytea' for ECPG  ("Matsumura, Ryo" <matsumura.ryo@jp.fujitsu.com>)
List pgsql-hackers
Hi Matsumoro-san,

thanks for your effort and apologies for the late reply. 

> I think that set/put data for host variable should be more simple.
> The following is an example of Oracle Pro *C program for RAW type
> column.

Just to be clear, Oracle can use varchars for binary data, right?

> In ECPG, varchar host variable cannot be used for bytea because it
> cannot treat
> '\0' as part of data. If the length is set to 10 and there is '\0' at
> 3rd byte,
> ecpglib truncates 3rd byte and later at the following:

I've been traveling too much to check, but does the standard say
anything about that?

> I also think that the behavior of varchar host variable should not be
> changed
> because of compatibility.
> Therefore, a new type of host variable 'bytea' is needed.

This I am actually not sure about. I think we should try to stick with
the standard and, if it does not comment on it, with what others in the
market do to make migrations easier. So far I do not remember any
database having a bytea datatype in embedded SQL.

Comments anyone?

Michael
-- 
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Meskes at (Debian|Postgresql) dot Org
Jabber: michael at xmpp dot meskes dot org
VfL Borussia! Força Barça! SF 49ers! Use Debian GNU/Linux, PostgreSQL



pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: pgbench - add pseudo-random permutation function
Next
From: Christian Ullrich
Date:
Subject: Problem with EDB 11.0 Windows x64 distributions