Re: ECPG patchset

From: Boszormenyi Zoltan <zb(at)cybertec(dot)at>
To: pgsql-hackers(at)postgresql(dot)org, Michael Meskes <meskes(at)postgresql(dot)org>
Cc: Hans-Juergen Schoenig <hs(at)cybertec(dot)at>
Subject: Re: ECPG patchset
Date: 2009-09-08 10:01:45
Message-ID: 4AA62B89.2020706@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

New patch, typo fix in pgc.l.

According to our customer who is porting their application
to PostgreSQL, this causes an error currently in ECPG:

========================================

1. within included structures the use of "$else;" is causing an
precompiler error (tested several times in different programs)
/home/progs/fors_neu/share/include/bwltrec.h:124: ERROR: syntax error at
or near ";"

Example:

mainprog.ec:
EXEC SQL BEGIN DECLARE SECTION;
EXEC SQL INCLUDE share/include/bwltrec.h; /* record bwlt */
EXEC SQL END DECLARE SECTION;

bwltrec.h:
struct record_type_bwlt
{ int firmnr; /* Firmennummer (2,0) */
int liwerk; /* Werk - Lieferant (2,0) */
...
$ifdef FORS3;
string besktr[7]; /* Kostentraeger */
$else;
string besktr[13]; /* Kostentraeger */
$endif;
} bwlt;

========================================

It looks to me that "EXEC SQL else;" is expected in the native
syntax, but "$else" (without ";" at the end of the line) is expected
in compat mode. Considering that the ";" seems to be expected
by esql, this must be a typo in ecpg/preproc/pgc.l

Best regards,
Zoltán Böszörményi

--
Bible has answers for everything. Proof:
"But let your communication be, Yea, yea; Nay, nay: for whatsoever is more
than these cometh of evil." (Matthew 5:37) - basics of digital technology.
"May your kingdom come" - superficial description of plate tectonics

----------------------------------
Zoltán Böszörményi
Cybertec Schönig & Schönig GmbH
http://www.postgresql.at/

Attachment Content-Type Size
6-pg85-dollar-else-1-ctxdiff.patch text/x-patch 710 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Otto 2009-09-08 10:48:24 Re: More Snow Leopard fun: multiarch problems while building plperl
Previous Message Peter Eisentraut 2009-09-08 06:34:36 Re: More Snow Leopard fun: multiarch problems while building plperl