| От | Tom Lane |
|---|---|
| Тема | Re: [GENERAL] Fun with Cursors- how to rewind a cursor |
| Дата | |
| Msg-id | 2689.1172819209@sss.pgh.pa.us обсуждение |
| Ответы |
Re: [GENERAL] Fun with Cursors- how to rewind a
cursor
|
| Список | pgsql-hackers |
"Postgres User" <postgres.developer@gmail.com> writes:
> On 3/1/07, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> "Postgres User" <postgres.developer@gmail.com> writes:
>>> <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.
> 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
Hm, you're right. This arises from the fact that _SPI_execute_plan
rejects cursor-related utility statements. While I'd never stopped
to question that before, it does seem like this restriction is a
bit pointless. Does anyone remember why it's like that?
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера