Joe Conway <mail(at)joeconway(dot)com> writes:
> I don't think you can use PERFORM like that. Try:
Actually I believe he can; after looking at the manual I realized that
the problem is that PERFORM is syntactically a substitute for SELECT.
In other words he needed to write
PERFORM 1 FROM orders ...
not
PERFORM SELECT 1 FROM orders ...
regards, tom lane