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

ECPG dynamic cursor, SQLDA support

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 (view raw or flat)
Thread:
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: ecpg-dyncursor-sqlda-8.4cvs-11-ctxdiff.patch
Description: text/x-patch (55.2 KB)

Responses

pgsql-hackers by date

Next:From: Peter EisentrautDate: 2009-06-24 10:07:52
Subject: Re: dblink for 8.4 should work without user-mappings
Previous:From: Brendan JurdDate: 2009-06-24 09:38:26
Subject: Re: BUG #4862: different results in to_date() between 8.3.7 & 8.4.RC1

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