Forum OpenACS Q&A: Response to Top 20 DOs and DONTs while developing OpenACS

Collapse
Posted by Vinod Kurup on
This would be very helpful, Jun. It belongs in this section (https://openacs.org/doc/openacs-4/eng-standards.html) of the docs.

A couple other possibilities:

  • Avoid the PG view/sequence trick
  • Delete the queries from your tcl files
  • When calling PL/PGSQL functions with more than 3 or 4 params, put a comment next to each param with the param's name
  • When creating PL/PGSQL functions, use p_ as the prefix for supplied parameters and v_ for local vars.
  • When declaring local PL/PGSQL vars, don't declare the type explicitly, instead use the table_name.column_name%TYPE notation.
        v_revision_id     cr_revisions.revision_id%TYPE;