From: | Sebastien FLAESCH <sf(at)4js(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Suggestion for parameterized queries |
Date: | 2005-03-01 07:41:39 |
Message-ID: | 42241CB3.3090709@4js.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Richard Huxton wrote:
> Sebastien FLAESCH wrote:
>
>> Hi,
>>
>> Parameterized queries (PREPARE/EXECUTE), is a great thing, but it
>> would even be better if the DECLARE CURSOR could use a PREPAREd
>> statement, to declare a "server-side" cursor with a parameterized
>> query, to use the benefits of DECLAREd cursors (no fetching of all the
>> result set on the client, use the binary mode, use the scrollable
>> option or the FOR UPDATE option).
>
>
>> For now we cannot use DECLARE CURSOR in our PostgreSQL driver because
>> of this limitation.... I could build the SQL statement with literal
>> values, but since you have now parametrized queries I would prefer to
>> use that...
>
>
> You can define a function that returns a cursor, if that is of any use
> to you.
>
Thanks for the idea, but actually we need that as a basic SQL feature,
because we write a database driver.
How to write a generic function that can execute any SELECT statement?
I can imagine that one param of the function would be the SQL text,
but what about passing a variable list of parameters?
Seb
From | Date | Subject | |
---|---|---|---|
Next Message | Teodor Sigaev | 2005-03-01 08:03:13 | Re: multicolumn GIST index question |
Previous Message | Jakab Laszlo | 2005-03-01 07:30:41 | unsubscribe |