| From: | "Postgres User" <postgres(dot)developer(at)gmail(dot)com> |
|---|---|
| To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Fun with Cursors- how to rewind a cursor |
| Date: | 2007-03-02 06:04:05 |
| Message-ID: | b88c3460703012204p2c3b101ft8af105526aa0210d@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general pgsql-hackers |
I had tried several variations of MOVE Backward inside an Execute
statement earlier. And now, I'm seeing this error appear again:
ERROR: 0A000: cannot manipulate cursors directly in PL/pgSQL
I updated the Postgres function below with this replacement line:
Execute 'MOVE Backward All In c_entry';
Any other thoughts?
On 3/1/07, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> "Postgres User" <postgres(dot)developer(at)gmail(dot)com> writes:
> > So I added the following code:
>
> > <before opening cursor> ref_entry = 'c_entry';
> > <after looping thru cursor> MOVE Backward All In c_entry;
>
> You have to use EXECUTE for the latter.
>
> regards, tom lane
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Postgres User | 2007-03-02 06:20:40 | Re: Add items to a record variable |
| Previous Message | Tom Lane | 2007-03-02 05:33:44 | Re: Fun with Cursors- how to rewind a cursor |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tatsuo Ishii | 2007-03-02 06:06:39 | Re: broken doc |
| Previous Message | Tom Lane | 2007-03-02 06:02:41 | Re: broken doc |