From dc1cb4ceb96ed32872de60561568bcb51e2478ac Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Thu, 8 Dec 2005 18:02:04 +0000 Subject: [PATCH] Add documentation about the inability of plpsql to use parameter names that are the same as column names used in the function. --- doc/src/sgml/plpgsql.sgml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/doc/src/sgml/plpgsql.sgml b/doc/src/sgml/plpgsql.sgml index 60a1572e703..635baffecda 100644 --- a/doc/src/sgml/plpgsql.sgml +++ b/doc/src/sgml/plpgsql.sgml @@ -1,5 +1,5 @@ @@ -3094,6 +3094,15 @@ AFTER INSERT OR UPDATE OR DELETE ON sales_fact + + + You cannot use parameter names that are the same as columns + that are referenced in the function. Oracle allows you to do this + if you qualify the parameter name using + function_name.paramater_name. + + + You can overload function names in PostgreSQL. This is @@ -3111,7 +3120,7 @@ AFTER INSERT OR UPDATE OR DELETE ON sales_fact - In PostgreSQL the function body has to be written as + In PostgreSQL the function body must be written as a string literal. Therefore you need to use dollar quoting or escape single quotes in the function body. See . @@ -3128,10 +3137,11 @@ AFTER INSERT OR UPDATE OR DELETE ON sales_fact Since there are no packages, there are no package-level variables - either. This is somewhat annoying. You may be able to keep per-session - state in temporary tables, instead. + either. This is somewhat annoying. You can keep per-session state + in temporary tables instead. +