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-19 10:04:47
Message-ID: 03040DFF97E6E54E88D3BFEE5F5480F737A6F60B@G01JPEXMBYT04
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Meskes-san

> > I do think, though, we should change the debug output for
> > ecpg_free_params().
>
> I try to change about it. Next patch will print binary in hex-format.

I implement and attach it. Please review a new patch in this mail.

I have a question about ecpg manual when I add article for bytea.
I wonder what does the following about VARCHAR mean.

35.4.4. Type Mapping
Table 35.1. Mapping Between PostgreSQL Data Types and C Variable Types

character(n), varchar(n), text | char[n+1], VARCHAR[n+1] [b]
<footnote>
[b] declared in ecpglib.h

There is no declaration for VARCHAR in ecpglib.h.
There is a declaration for ECPGt_varchar in ecpgtype.h, but it may be
be unusefull information for users.

On the other hand, footnote for 'bool' is usefull because there is
C-definition macro in ecpglib.h.

<footnote>
[c] declared in ecpglib.h if not native

<ecpglib.h>
#ifndef bool
#define bool char
#endif

I think, if the footnote of VARCHAR is meaningless, I remove it while I add
the article for bytea. (I didn't remove in this patch.)

Regards
Ryo Matsumura

Attachment Content-Type Size
ecpg_bytea_pg_v1_2.patch application/octet-stream 22.3 KB
ecpg_bytea_test_v1_2.patch application/octet-stream 48.6 KB
ecpg_bytea_doc_v1_2.patch application/octet-stream 1.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2018-12-19 10:15:56 Re: What to name the current heap after pluggable storage / what to rename?
Previous Message Alexey Kondratov 2018-12-19 09:58:58 Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions