"Dmitry Koterov" <dmitry(at)koterov(dot)ru> writes:
> I propose to add the SELECT clause to do it natively, like this:
> SELECT *
> FROM tbl
> ORDER BY id
> LIMIT 10
> SETTING something=off, other=off
Use a function with a SET clause attached.
regards, tom lane