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

From Matsumura, Ryo
Subject RE: [PROPOSAL]a new data type 'bytea' for ECPG
Date
Msg-id 03040DFF97E6E54E88D3BFEE5F5480F737A6E075@G01JPEXMBYT04
Whole thread Raw
In response to RE: [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
List 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

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Fixing typos in tests of partition_info.sql
Next
From: amul sul
Date:
Subject: Re: ALTER INDEX ... ALTER COLUMN not present in dump