ECPG dynamic cursor, SQLDA support

Lists: pgsql-hackers
From: Boszormenyi Zoltan <zb(at)cybertec(dot)at>
To: Michael Meskes <meskes(at)postgresql(dot)org>
Cc: Hans-Juergen Schoenig <hs(at)cybertec(dot)at>, PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: ECPG dynamic cursor, SQLDA support
Date: 2009-06-24 09:51:57
Message-ID: 4A41F73D.7020502@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi,

attached is our latest patch extending ECPG:

1. Support computed cursorname (DECLARE :cursorname ..., etc)
No change in that part, it's purely a parser-only change, there's no
ECPGdo() change you criticized or any other bad juju. Because of
adding support for :cursorname and the dynamically generated
ECPG grammar, we needed to modify the main gram.y as well,
to make way for computed cursor names. The fetch_direction and
FetchStmt change was needed in gram.y because otherwise
"FETCH fetch_direction from_in cursor_name" and
"MOVE fetch_direction from_in cursor_name" rules caused
shift/reduce conflicts in the "fetch_direction" rule in ECPG grammar.
This modification was a little sacrifice in gram.y but it allowed
keeping the ECPG grammar clean and little change in the automatic
grammar generation.

2. Support SQLDA structure in ECPG, both in USING DESCRIPTOR
and INTO DESCRIPTOR, if Informix-compatible mode is set.
This means the following changes
- introduce the pg_sqlda_t and pg_sqlvar_t structures, ECPGt_sqlda type
and SQLNNN contants in sqltypes.h
- make a distinction between DESCRIPTOR and SQL DESCRIPTOR
in Informix mode
- Support FETCH ... USING DESCRIPTOR in Informix mode only,
that works the same way as FETCH ... INTO DESCRIPTOR.
3. Support DESCRIBE OUTPUT
The support was added as a new, exported ECPGdescribe2() function
in descriptor.c, the old unsupported ECPGescribe() interface was
left intact
so the libecpg.so major library version doesn't need to be changed.

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
ecpg-dyncursor-sqlda-8.4cvs-11-ctxdiff.patch text/x-patch 55.2 KB

From: Michael Meskes <meskes(at)postgresql(dot)org>
To: Boszormenyi Zoltan <zb(at)cybertec(dot)at>
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 dynamic cursor, SQLDA support
Date: 2009-06-25 15:18:05
Message-ID: 20090625151805.GA5308@hyperion.credativ.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Wed, Jun 24, 2009 at 11:51:57AM +0200, Boszormenyi Zoltan wrote:
> attached is our latest patch extending ECPG:

Just as a short explanation, the older versions were sent to me only and I
reviewed them. I haven't found time to to review this one yet though.

Michael
--
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org
ICQ: 179140304, AIM/Yahoo/Skype: michaelmeskes, Jabber: meskes(at)jabber(dot)org
Go VfL Borussia! Go SF 49ers! Use Debian GNU/Linux! Use PostgreSQL!


From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Boszormenyi Zoltan <zb(at)cybertec(dot)at>, 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 dynamic cursor, SQLDA support
Date: 2009-07-25 02:25:38
Message-ID: 603c8f070907241925s1f43177cg7e13e552131cb63e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Thu, Jun 25, 2009 at 11:18 AM, Michael Meskes<meskes(at)postgresql(dot)org> wrote:
> On Wed, Jun 24, 2009 at 11:51:57AM +0200, Boszormenyi Zoltan wrote:
>> attached is our latest patch extending ECPG:
>
> Just as a short explanation, the older versions were sent to me only and I
> reviewed them. I haven't found time to to review this one yet though.

Are you planning to review this one soon?

...Robert


From: Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>
To: Boszormenyi Zoltan <zb(at)cybertec(dot)at>
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 dynamic cursor, SQLDA support
Date: 2009-07-25 21:38:25
Message-ID: 3073cc9b0907251438n6bf3610em604c6aebbd220ea8@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Wed, Jun 24, 2009 at 4:51 AM, Boszormenyi Zoltan<zb(at)cybertec(dot)at> wrote:
> Hi,
>
> attached is our latest patch extending ECPG:
>

haven't tested this nor reviewed the code in detail, just some little questions:

1) This is in /src/interfaces/ecpg/ecpglib/sqlda.c, and doesn't seems
something we want in our files... looking at actual code seems like
ecpg.c have something similar but at least specify that it has the
same license as PostgreSQL

+ *
+ * (C) 2009 Cybertec GmbH
+ * Zoltán Böszörményi <zb(at)cybertec(dot)at>
+ * Hans-Jürgen Schönig <hs(at)cybertec(dot)at>
+ */

2) In src/interfaces/ecpg/include/sqltypes.h there some #if 0 added,
why are those? seems like something that doesn't need to be added

+ #if 0
+ #define SQLSET 19
+ #define SQLMULTISET 20
+ #define SQLLIST 21
+ #define SQLROW 22
+ #define SQLCOLLECTION 23
+ #define SQLROWREF 24
+ #endif

--
Atentamente,
Jaime Casanova
Soporte y capacitación de PostgreSQL
Asesoría y desarrollo de sistemas
Guayaquil - Ecuador
Cel. +59387171157


From: Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>
To: Boszormenyi Zoltan <zb(at)cybertec(dot)at>
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 dynamic cursor, SQLDA support
Date: 2009-07-25 21:41:26
Message-ID: 3073cc9b0907251441u2af541f3jcc7fe8164d839103@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Sat, Jul 25, 2009 at 4:38 PM, Jaime
Casanova<jcasanov(at)systemguards(dot)com(dot)ec> wrote:
> On Wed, Jun 24, 2009 at 4:51 AM, Boszormenyi Zoltan<zb(at)cybertec(dot)at> wrote:
>> Hi,
>>
>> attached is our latest patch extending ECPG:
>>
>
> haven't tested this nor reviewed the code in detail, just some little questions:
>
> 1) This is in /src/interfaces/ecpg/ecpglib/sqlda.c, and doesn't seems
> something we want in our files... looking at actual code seems like
> ecpg.c have something similar but at least specify that it has the
> same license as PostgreSQL
>
> +  *
> +  * (C) 2009 Cybertec GmbH
> +  *     Zoltán Böszörményi <zb(at)cybertec(dot)at>
> +  *     Hans-Jürgen Schönig <hs(at)cybertec(dot)at>
> +  */
>

seems like Michael already comment this but i lose that thread before...

--
Atentamente,
Jaime Casanova
Soporte y capacitación de PostgreSQL
Asesoría y desarrollo de sistemas
Guayaquil - Ecuador
Cel. +59387171157


From: Michael Meskes <meskes(at)postgresql(dot)org>
To: Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>
Cc: Boszormenyi Zoltan <zb(at)cybertec(dot)at>, 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 dynamic cursor, SQLDA support
Date: 2009-08-05 11:48:29
Message-ID: 20090805114829.GA9435@feivel.credativ.lan
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Sat, Jul 25, 2009 at 04:38:25PM -0500, Jaime Casanova wrote:
> 1) This is in /src/interfaces/ecpg/ecpglib/sqlda.c, and doesn't seems
> something we want in our files... looking at actual code seems like
> ecpg.c have something similar but at least specify that it has the
> same license as PostgreSQL

Oops, didn't notice that this still had the old text, fixed in CVS.

> + * (C) 2009 Cybertec GmbH
> + * Zoltán Böszörményi <zb(at)cybertec(dot)at>
> + * Hans-Jürgen Schönig <hs(at)cybertec(dot)at>
> + */

So am I right to assume that the consensus is to not accept this kind of
notice?

Michael

--
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org
ICQ: 179140304, AIM/Yahoo/Skype: michaelmeskes, Jabber: meskes(at)jabber(dot)org
Go VfL Borussia! Go SF 49ers! Use Debian GNU/Linux! Use PostgreSQL!