RE: [PROPOSAL]a new data type 'bytea' for ECPG

From: "Matsumura, Ryo" <matsumura(dot)ryo(at)jp(dot)fujitsu(dot)com>
To: "Matsumura, Ryo" <matsumura(dot)ryo(at)jp(dot)fujitsu(dot)com>, 'Michael Meskes' <meskes(at)postgresql(dot)org>, "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com>
Cc: "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-12-17 09:11:10
Message-ID: 03040DFF97E6E54E88D3BFEE5F5480F737A6E075@G01JPEXMBYT04
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Meskes-san

I noticed that I was confused.
My topic was about adding bytea as new host variable type.

The topic *didn't* include that receiving binary format data
into SQLDATA descriptor like the following.

sqlda_t *sqlda;
exec sql create table if not exists test (c1 bytea);
exec sql select c1 into descriptor sqlda from test;
/* It expects that sqlda->sqlvar[0].sqldata is binary format. */

So, please ignore the following in my mail at 2018-11-12 02:14:58.
> P.S.
> The patch does not support ECPG.bytea in sqltype of "struct sqlvar_struct"
> because of compatibility.

The topic included that receiving binary data into Named SQL descriptor with
using bytea host variable like the following. It has already been
implemented in my patch.

exec sql begin declare section;
bytea var[128];
exec sql end declare section;
exec sql create table if not exists test (c1 bytea);
exec sql allocate descriptor odesc;
exec sql select c1 into sql descriptor odesc from test;
exec sql get descriptor odesc value 1 :var = data;

Regards
Ryo Matsumura

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message amul sul 2018-12-17 09:14:32 Re: ALTER INDEX ... ALTER COLUMN not present in dump
Previous Message Michael Paquier 2018-12-17 09:10:08 Re: Fixing typos in tests of partition_info.sql