Re: DECLARE CURSOR

From: snpe <snpe(at)snpe(dot)co(dot)yu>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: DECLARE CURSOR
Date: 2002-11-16 22:32:13
Message-ID: 200211162232.13082.snpe@snpe.co.yu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Saturday 16 November 2002 09:29 pm, Frank Miles wrote:
> On Fri, 15 Nov 2002, snpe wrote:
> > Hello,
> > When I call DECLARE CURSOR out of transaction command success,
> > but cursor is not created
> > Reference manual say that this get error :
> > ERROR: DECLARE CURSOR may only be used in begin/end transaction blocks
> > I don't find this text in pgsql source code
> > What is problem ?
>
> According to the documentation for DECLARE CURSOR (v.7.2.x):
>
> "Cursors are only available in transactions. Use to BEGIN, COMMIT and
> ROLLBACK to define a transaction block."
>
> This seems consistent with your error message. Please try
> wrapping your DECLARE inside a transaction using BEGIN,...
>

I understand it.
I don't understand why 'DECLARE CURSOR' success out of a transaction
- I expect error

regards
haris peco

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Luis Fresco Zens 2002-11-17 00:06:20 Inquiry From Form [pgsql]
Previous Message Medi Montaseri 2002-11-16 21:53:39 pfree() core dump in 7.2.3

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-11-17 01:11:28 Re: [HACKERS] ipc-daemon
Previous Message Richard Pais 2002-11-16 22:27:22 Re: [HACKERS] ipc-daemon