Re: LIMIT/OFFSET doesn't work on PL/PGSQL

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: LIMIT/OFFSET doesn't work on PL/PGSQL
Дата
Msg-id 24131.1047680857@sss.pgh.pa.us
обсуждение исходный текст
Ответ на LIMIT/OFFSET doesn't work on PL/PGSQL  ("Fernando Papa" <fpapa@claxson.com>)
Список pgsql-general
"Fernando Papa" <fpapa@claxson.com> writes:
> I don't know why the last query doesn't work inside function... I run
> the query from psql and every goes ok, but when I use the function, I
> can't see anything (the function doesn't retrieve anything). I put fixed
> value on LIMIT and the function execute correctly.

I think the problem is passing plpgsql variables into a cursor
declaration, not limit/offset per se.  You need to use the defined
syntax for cursor parameters to make that work, I believe.

            regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: Dennis Gearon
Дата:
Сообщение: Re: The folding of unquoted names to lower case in PostgreSQL
Следующее
От: "Fernando Papa"
Дата:
Сообщение: Re: LIMIT/OFFSET doesn't work on PL/PGSQL