Skip site navigation (1) Skip section navigation (2)

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
Message-ID: 4A4F7090.6080200@cybertec.at (view raw or flat)
Thread:
Lists: pgsql-hackers
Hi,

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;
and
    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
http://www.postgresql.at/


Attachment: ecpg-string-8.4-2-ctxdiff.patch
Description: text/x-patch (16.4 KB)

In response to

Responses

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group