Forum OpenACS Q&A: Re: How to insert more than 16 values into a table of postgresql, using functions

Yes, the file should be there. Just check.

The difference between function and procedure in plpgsql is that a function has a return value. If you say "select plpgsql_func(...)" in db_exec_plsql block, you will get the key, as long as the plpgsql function returns the appropiate key.

You can even use sequence pooling and db_nextval to get the key so you don't even have to grab the value from plpgsql. See OpenACS DB Access API Guide for this.

Example:

set key [db_nextval yoursequence]

db_exec_plsql procname "select procname($key, ...(other attributes)...)"
db_exec_plsql proc2name "select proc2name($key, ...(rest of the attributes)...)"
Hope this helps.