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-05 12:20:05
Message-ID: 4AA25775.2020006@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Boszormenyi Zoltan írta:
> Out of scope cursor usage
>

New version of this, changes:
- DECLARE cursor FOR prepared_stmt is also handled properly
- ECPG_informix_set_var() calls are not emitted for global statements
- regression test "outofscope.pgc" is updated

I think it's now at the point where we can reconsider your argument
about making this feature generic and not an Informix-only feature:

> Yeah, right, and you also add this hack to all applications. No.

I don't think it's hackish at all now. Read the outofscope.pgc
regression test and its generated source.
- ECPG_informix_set_var() calls are only generated for variables
in function scope, not for globals.
- ECPG_informix_get_var() calls are generated only when
OPEN and FETCH are in a function different from the one
where DECLARE was.

In the common case the generated source would only contain
some *_set_var() calls but the function references wouldn't change.

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
4-pg85-outofscopedeclare-4-ctxdiff.patch text/x-patch 100.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-09-05 15:06:56 Re: No AVworkers when PM_RECOVERY_CONSISTENT
Previous Message Simon Riggs 2009-09-05 08:13:02 No AVworkers when PM_RECOVERY_CONSISTENT