"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