The docs imply that if I want to call a function and ignore what it returns I can say
perform foo();
instead of
select foo();
this seems to be the solution to wanting to have a stored procedure sort of thing that doesn't return anything. You declare a function and then ignore its return value with perform. This would seem to be the solution to my problem of doing something like
statement.executeUpdate("select foo()");
throwing an exception that whines about a result set being created.
Problem is, it doesn't seem to work from the regular sql interpreter (or when called from jdbc). I get "syntax error at 'perform'" or something similar.
Why is this in the docs if it doesn't work? Or am I using it wrong?
postgres 7.4 is the version I'm using.