| От | Jeroen T. Vermeulen |
|---|---|
| Тема | Re: Error using cursors/fetch and execute |
| Дата | |
| Msg-id | 20030107142139.GA78363@xs4all.nl обсуждение |
| Ответ на | Error using cursors/fetch and execute ("Magnus Naeslund(f)" <mag@fbab.net>) |
| Список | pgsql-hackers |
On Tue, Jan 07, 2003 at 02:29:30PM +0100, Magnus Naeslund(f) wrote:
>
> mag=# create table test (id serial unique primary key, txt text);
> mag=# insert into test(txt) values('hoho1');
> mag=# prepare berra (integer) as select * from test where id = $1;
> mag=# declare berra_c cursor for execute berra(1);
> ERROR: parser: parse error at or near "execute" at character 28
>
> Is there any other way of fetching less than all rows at once, similar
> to that of using cursors. I don't use it for any other purpose than
> that.
Just
begin;
declare berra cursor for select * from test where id = 1;
fetch 100 from berra;
[...]
end;
Jeroen
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера