Forum OpenACS Development: Response to SQL functions returning rowsets (of one type)

Collapse
Posted by Don Baccus on
Yes, I did, actually - only SQL functions can return rowsets at this
point, though.

You can also pass in table names as parameters, and then address them
like table_name.function_name, but I've not played with this.

You can also pass in table names to PL/pgSQL but I've not succeeded in
figuring out exactly how to do anything useful afterwards.  I just
spent a few minutes at it a few weeks ago and need to spend some more
time to see exactly what's going on.  It would
be good information to have as it eliminates the need for "dynamic
SQL" in some cases.

The ACS doesn't define functions that return rowsets, and in fact I'm
not sure that PL/SQL supports it.  Anyway, I asked last month if ACS
4.1 used any functions returning rowsets and the answer was "no".

PL/pgSQL will get to return rowsets at some point and that will be
very cool.  I've been frustrated by that lack in some of my own
personal work with PG.