From: | Michael Meskes <meskes(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: ECPG: Make the preprocessor emit '; ' if the variable type for a |
Date: | 2013-11-26 16:42:00 |
Message-ID: | [email protected] |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
ECPG: Make the preprocessor emit ';' if the variable type for a list of
variables is varchar. This fixes this test case:
int main(void)
{
exec sql begin declare section;
varchar a[50], b[50];
exec sql end declare section;
return 0;
}
Since varchars are internally turned into custom structs and
the type name is emitted for these variable declarations,
the preprocessed code previously had:
struct varchar_1 { ... } a _,_ struct varchar_2 { ... } b ;
The comma in the generated C file was a syntax error.
There are no regression test changes since it's not exercised.
Patch by Boszormenyi Zoltan <zb(at)cybertec(dot)at>
Branch
------
REL9_2_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/b05c415c8115840f5340d65be0ca3dd437edd5bd
Modified Files
--------------
src/interfaces/ecpg/preproc/ecpg.trailer | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Meskes | 2013-11-26 16:42:01 | pgsql: ECPG: Fix offset to NULL/size indicator array. |
Previous Message | Heikki Linnakangas | 2013-11-26 12:34:29 | pgsql: Handle domains over arrays like plain arrays in PL/python. |