From 050710b36964dee7e1b2bf6b5ef00041fd5d2787 Mon Sep 17 00:00:00 2001 From: Michael Meskes Date: Mon, 18 Feb 2019 10:20:31 +0100 Subject: 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" ) Discussion: https://postgr.es/m/flat/03040DFF97E6E54E88D3BFEE5F5480F737A141F9@G01JPEXMBYT04 --- src/interfaces/ecpg/preproc/variable.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/interfaces/ecpg/preproc/variable.c') diff --git a/src/interfaces/ecpg/preproc/variable.c b/src/interfaces/ecpg/preproc/variable.c index a953498c1c9..887d479e735 100644 --- a/src/interfaces/ecpg/preproc/variable.c +++ b/src/interfaces/ecpg/preproc/variable.c @@ -560,6 +560,7 @@ adjust_array(enum ECPGttype type_enum, char **dimension, char **length, char *ty break; case ECPGt_varchar: + case ECPGt_bytea: /* pointer has to get dimension 0 */ if (pointer_len) *dimension = mm_strdup("0"); -- cgit v1.2.3