]> granicus.if.org Git - postgresql/commit
Add bytea datatype to ECPG.
authorMichael Meskes <meskes@postgresql.org>
Mon, 18 Feb 2019 09:20:31 +0000 (10:20 +0100)
committerMichael Meskes <meskes@postgresql.org>
Mon, 18 Feb 2019 09:20:31 +0000 (10:20 +0100)
commit050710b36964dee7e1b2bf6b5ef00041fd5d2787
tree888139b986d5d65660bd26d11c3c69d3b1d7e513
parent3fdc374b5d24b08119a91555ca2fae427af0b085
Add bytea datatype to ECPG.

So far ECPG programs had to treat binary data for bytea column as 'char' type.
But this meant converting from/to escaped format with PQunescapeBytea/
PQescapeBytea() and therefore forcing users to add unnecessary code and cost
for the conversion in runtime. By adding a dedicated datatype for bytea most of
this special handling is no longer needed.

Author: Matsumura-san ("Matsumura, Ryo" <matsumura.ryo@jp.fujitsu.com>)

Discussion: https://postgr.es/m/flat/03040DFF97E6E54E88D3BFEE5F5480F737A141F9@G01JPEXMBYT04
18 files changed:
doc/src/sgml/ecpg.sgml
src/interfaces/ecpg/ecpglib/data.c
src/interfaces/ecpg/ecpglib/descriptor.c
src/interfaces/ecpg/ecpglib/ecpglib_extern.h
src/interfaces/ecpg/ecpglib/execute.c
src/interfaces/ecpg/ecpglib/misc.c
src/interfaces/ecpg/ecpglib/typename.c
src/interfaces/ecpg/include/ecpgtype.h
src/interfaces/ecpg/preproc/ecpg.header
src/interfaces/ecpg/preproc/ecpg.trailer
src/interfaces/ecpg/preproc/type.c
src/interfaces/ecpg/preproc/variable.c
src/interfaces/ecpg/test/ecpg_schedule
src/interfaces/ecpg/test/expected/sql-bytea.c [new file with mode: 0644]
src/interfaces/ecpg/test/expected/sql-bytea.stderr [new file with mode: 0644]
src/interfaces/ecpg/test/expected/sql-bytea.stdout [new file with mode: 0644]
src/interfaces/ecpg/test/sql/Makefile
src/interfaces/ecpg/test/sql/bytea.pgc [new file with mode: 0644]