Search Postgresql Archives

Re: Prepared statements and cursors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 28, 2014 at 7:53 AM, Andreas Lubensky <lubensky@xxxxxxxxxxxx> wrote:
> That is an interesting approach. However, I see the problem that the
> functions would have to be removed when no longer needed. If that fails
> (broken connection etc.), they would be orphaned.
> Prepared statements are bound to the connection, so when the connection
> is closed they are gone.

well, you could abstract the function:
create or replace function eval(text) returns void as $$ begin execute
$1; end; $$ language plpgsql;
select eval('declare v cursor for select 0');

note, here eval() is a gaping security hole, so be advised.

merlin


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux