From: | "Patric Bechtel" <bechtel(at)ipcon(dot)de> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Is prepared cursored query possible? [Viruschecked] |
Date: | 2003-01-02 09:52:49 |
Message-ID: | 20030102095305.00469475A3F@postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, 01 Jan 2003 23:22:11 -0500, Tom Lane wrote:
>"Patric Bechtel" <bechtel(at)ipcon(dot)de> writes:
>> As I refer to the docs, they say only select is possible, which seems
>> illogical to me.
>
>Why? A cursor has to have some rows to read, ISTM. Putting INSERT or
>UPDATE or DELETE in it would make no sense.
>
> regards, tom lane
>
>
That's not the point. I want to prepare a query, like
"prepare myplan(bigint) as select * from adresses where id=$1"
and then
"declare mycurs cursor as execute myplan(47110815)"
That's not possible, as I have to put the source query
behind the cursor declaration.
I WOULD understand when declare failed on prepared
update, delete or insert statements, kind of at least.
But no prepared queries at all?
tia
Patric
From | Date | Subject | |
---|---|---|---|
Next Message | Ben-Nes Michael | 2003-01-02 12:32:36 | Re: compiling 7.3 on RH7.2 |
Previous Message | Daniel Kalchev | 2003-01-02 08:53:22 | Re: [HACKERS] Cast your vote ... |