Forum OpenACS Q&A: Re: How to insert more than 16 values into a table of postgresql, using functions
I will try to do the first solution i.e changing the config file. Is it available with PostGreSQL 7.2.4 version, as i am using this as my database.
One more doubt about the second solution that how to get the "key" of the row from the function i tried with the ACS API called as db_exec_plsql but i could not able to get the return value from the function after the execution of function xxx_new. Can u plz tell me how to do this in a small sample way.
I once thank you for your answere, hoping to get solution from you in a early way.
Venu Madhav Deevi
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.
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.