Re: BUG #14776: ecpg 4.12.0 issues with macros containing line continued blocks

From: "Thomas S(dot) Chin" <thom(at)genx(dot)net>
To: Michael Meskes <meskes(at)postgresql(dot)org>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #14776: ecpg 4.12.0 issues with macros containing line continued blocks
Date: 2017-08-11 09:04:45
Message-ID: 11863a5c-d6f6-43c1-2c44-64a4f83722c4@genx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hello Michael,

Yes, I can. I had hit the "Save" button prematurely, expecting another
page to provide code fragments.

---

typedef char test_t[3];

EXEC SQL TYPE test_t IS VARCHAR[2];

// COMMENT OUT macros with line continued code block to get working
#define TEST_MACROS(x) { \
}

EXEC SQL BEGIN DECLARE SECTION;
test_t test;
EXEC SQL END DECLARE SECTION;

---

ecpg -o test.c test.pgc
test.pgc:10: ERROR: unrecognized data type name "test_t"

---

This test case works with ecpg (PostgreSQL 9.4.7) 4.10.0.
This test case works with ecpg (PostgreSQL 9.5.7) 4.11.0.
This test case does not work with ecpg (PostgreSQL 9.6.3) 4.12.0.

The code is processed successfully if the macros is omitted, commented
out or changed to be on a single line:

#define TEST_MACROS(x) { }

Thanks!

Best,
Thomas S. Chin

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Augustine, Jobin 2017-08-11 12:41:03 Re: [HACKERS] Replication to Postgres 10 on Windows is broken
Previous Message Peter Eisentraut 2017-08-11 02:31:01 Re: Crash report for some ICU-52 (debian8) COLLATE and work_mem values