Forum OpenACS Q&A: Response to Personal/Corporate Calendar in ACS

Collapse
Posted by Don Baccus on
For the 4x timeline see the other (4.0 design) forum, a proposed schedule is posted there.

Regarding ad_proc, I've not taken a close look at 3.4 so don't know what the private/public function flags do.  I suggest you study the code - it may be taking advantage of namespaces (Tcl 8x) or the like to avoid name collisions.  But I don't know.  Does anyone else, offhand?

(I'm busy with a bunch of stuff at the moment, otherwise I'd be willing to dig into the details myself).

The "begin 1:=func_name(); end;" constructs refer to a PL/SQL function.  You have to rewrite func_name() in PL/pgSQL.  You might see  Roberto's beta "PL/pgSQL for PL/SQL porters" manual, also referenced in the "4.0 design" forum.

After re-writing the function, you simply call it like this:

ns_db 1row $db "select func_name()"

Postgres doesn't require the "from" clause in such cases, i.e. no need  to do a "from dual".  Since you're not interested in the result of the function in this case, you don't need to call set_variables_after_query.