Re: ECPG support for string pseudo-type

From: Boszormenyi Zoltan <zb(at)cybertec(dot)at>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Michael Meskes <meskes(at)postgresql(dot)org>, Hans-Juergen Schoenig <hs(at)cybertec(dot)at>, PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ECPG support for string pseudo-type
Date: 2009-07-04 15:09:04
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


Tom Lane írta:
> Boszormenyi Zoltan <zb(at)cybertec(dot)at> writes:
>> in a continued effort for better Informix ESQL/C compatibility,
>> we added the "string" pseudo-type handling to ECPG.
>> ...
>> - "string" has become a type name, reserved word in ECPG.
> This seems like a sufficient reason to reject the patch. Who knows
> what that will break? (I observe that it already broke a few of the
> ecpg regression tests, suggesting that using "string" as a variable
> name is hardly uncommon.)
> regards, tom lane

OK, let me retry. This version treats "string" as a non-reserved word,
and also discovers whether the PGC contains this construct below,
as in ecpg/tests/preproc/type.pgc:

exec sql type string is char[11];
typedef char string[11];

Now all regression tests pass unchanged and ECPG also accepts
string *string;
string string[N];
without typedef, replacing "string" with "char".

I think it's acceptable.

Thanks in advance,
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

Attachment Content-Type Size
ecpg-string-8.4-2-ctxdiff.patch text/x-patch 16.4 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2009-07-04 19:58:46 problem with varlena and extended type
Previous Message Tom Lane 2009-07-04 13:51:57 Re: ECPG support for string pseudo-type