aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2005-12-08 18:02:10 +0000
committerBruce Momjian <bruce@momjian.us>2005-12-08 18:02:10 +0000
commit00b013b56edae286f9601b902462e824d8a9387e (patch)
tree75c9774f3870f0ba02e989effd0f272f1c38f7d4
parenta3e1e996745a249b5b531a25d3a216bb2dad3088 (diff)
downloadpostgresql-00b013b56edae286f9601b902462e824d8a9387e.tar.gz
postgresql-00b013b56edae286f9601b902462e824d8a9387e.zip
Add documentation about the inability of plpsql to use parameter names
that are the same as column names used in the function.
-rw-r--r--doc/src/sgml/plpgsql.sgml18
1 files changed, 14 insertions, 4 deletions
diff --git a/doc/src/sgml/plpgsql.sgml b/doc/src/sgml/plpgsql.sgml
index 87cd7c0d173..bba3ab127f6 100644
--- a/doc/src/sgml/plpgsql.sgml
+++ b/doc/src/sgml/plpgsql.sgml
@@ -1,5 +1,5 @@
<!--
-$PostgreSQL: pgsql/doc/src/sgml/plpgsql.sgml,v 1.80.2.1 2005/12/01 10:38:09 neilc Exp $
+$PostgreSQL: pgsql/doc/src/sgml/plpgsql.sgml,v 1.80.2.2 2005/12/08 18:02:10 momjian Exp $
-->
<chapter id="plpgsql">
@@ -3096,6 +3096,15 @@ AFTER INSERT OR UPDATE OR DELETE ON sales_fact
<listitem>
<para>
+ 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
+ <literal>function_name.paramater_name</>.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
You can overload function names in <productname>PostgreSQL</>. This is
often used to work around the lack of default parameters.
</para>
@@ -3111,7 +3120,7 @@ AFTER INSERT OR UPDATE OR DELETE ON sales_fact
<listitem>
<para>
- In <productname>PostgreSQL</> the function body has to be written as
+ In <productname>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 <xref
linkend="plpgsql-quote-tips">.
@@ -3128,10 +3137,11 @@ AFTER INSERT OR UPDATE OR DELETE ON sales_fact
<listitem>
<para>
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.
</para>
</listitem>
+
</itemizedlist>
</para>