From: | Neil Conway <neilc(at)samurai(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Константин <beholder(at)mmska(dot)ru>, pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: PLPGSQL and FOUND stange behaviour after EXECUTE |
Date: | 2004-10-01 05:07:34 |
Message-ID: | 1096607254.9055.10.camel@localhost.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Fri, 2004-10-01 at 13:39, Tom Lane wrote:
> Possibly not. Can EXECUTE determine how the executed statement would
> have set the flag?
At the moment, EXECUTE just feeds the string it finds to spi_execute().
We could probably hack it to figure out how to modify FOUND, but I think
it would be ugly. One way to fix this would be to reimplement EXECUTE to
be essentially `eval': it would take an arbitrary string and execute it
as a PL/pgSQL statement. That would fix the FOUND problem, and also give
us EXECUTE INTO in one fell swoop. (Rather than reimplementing EXECUTE,
we might want to add this functionality as a new command -- "EVAL" might
be a good name for it.)
> Should we assume that the function doing the EXECUTE
> knows exactly what it's executing and what the implications on FOUND
> ought to be?
I think it's reasonable to assume that the application developer knows
this much.
-Neil
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-10-01 05:14:18 | Re: PLPGSQL and FOUND stange behaviour after EXECUTE |
Previous Message | Neil Conway | 2004-10-01 04:53:28 | Re: semicolon not required on END statement |