| From: | Michael Meskes <meskes(at)postgresql(dot)org> |
|---|---|
| To: | "Matsumura, Ryo" <matsumura(dot)ryo(at)jp(dot)fujitsu(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: [PROPOSAL]a new data type 'bytea' for ECPG |
| Date: | 2018-10-24 13:29:12 |
| Message-ID: | c13f256231e686de27cba1664a3d527915a18b36.camel@postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Christian Ullrich | 2018-10-24 13:45:50 | Problem with EDB 11.0 Windows x64 distributions |
| Previous Message | Fabien COELHO | 2018-10-24 11:55:46 | Re: pgbench - add pseudo-random permutation function |