Gregory Seidman <gss+pg@cs.brown.edu> writes:
> It is not, however, clear to me the difference between a stored procedure
> which can be CALL'd and a function which must be SELECT'd. Can anyone
> explain why the distinction is important?
As of 7.3 we should have reasonable support for functions returning
rowsets. The main thing that a CALL-type interface could offer is the
ability for a single procedure call to return *multiple* rowsets.
You can sort of fake this now by returning multiple cursors, but it's
awkward.
The real problem with anything like this is figuring out how to
declare/bind/access output parameters from a CALL. That doesn't
fit into SQL very well, since SQL has no such thing as a global
variable ...
regards, tom lane