Index: openacs-4/packages/acs-core-docs/www/eng-standards-plsql.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/eng-standards-plsql.html,v diff -u -N -r1.40 -r1.41 --- openacs-4/packages/acs-core-docs/www/eng-standards-plsql.html 16 Feb 2005 00:21:02 -0000 1.40 +++ openacs-4/packages/acs-core-docs/www/eng-standards-plsql.html 4 Jun 2006 00:45:24 -0000 1.41 @@ -1,4 +1,5 @@ -PL/SQL Standards

PL/SQL Standards

+ +PL/SQL Standards

PL/SQL Standards

By Richard Li and Yon Feldman

OpenACS docs are written by the named authors, and may be edited @@ -15,7 +16,7 @@ is maintainable by others, this is especially true in our case because we are building an open source toolkit than anyone can download and browse the source code. So document like you are - trying to impress your "Introduction to Programming" professor or + trying to impress your "Introduction to Programming" professor or TA.

  • It is important to be consistent throughout an application as much @@ -62,7 +63,7 @@ <package_name>;, not just end;; same goes for procedures, functions, package bodies, and triggers.

  • - Always use the "show errors" SQL*Plus command after each PL/SQL + Always use the "show errors" SQL*Plus command after each PL/SQL block. It will help you debug when there are compilation errors in your PL/SQL code.

  • @@ -107,15 +108,15 @@ show errors

  • - Explicitly designate each parameter as "in," "out," or "inout." + Explicitly designate each parameter as "in," "out," or "inout."

  • Each parameter should be on its own line, with a tab after the parameter name, then in/out/inout, then a space, and finally the datatype.

  • Use %TYPE and %ROWTYPE whenever possible.

  • - Use 't' and 'f' for booleans, not the PL/SQL "boolean" datatype + Use 't' and 'f' for booleans, not the PL/SQL "boolean" datatype because it can't be used in SQL queries.

  • All new functions (e.g., acs_object.new,