Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit dc1cb4c

Browse files
committed
Add documentation about the inability of plpsql to use parameter names
that are the same as column names used in the function.
1 parent 4ebd422 commit dc1cb4c

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

doc/src/sgml/plpgsql.sgml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/plpgsql.sgml,v 1.81 2005/12/01 10:36:57 neilc Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/plpgsql.sgml,v 1.82 2005/12/08 18:02:04 momjian Exp $
33
-->
44

55
<chapter id="plpgsql">
@@ -3094,6 +3094,15 @@ AFTER INSERT OR UPDATE OR DELETE ON sales_fact
30943094
</para>
30953095
</listitem>
30963096

3097+
<listitem>
3098+
<para>
3099+
You cannot use parameter names that are the same as columns
3100+
that are referenced in the function. Oracle allows you to do this
3101+
if you qualify the parameter name using
3102+
<literal>function_name.paramater_name</>.
3103+
</para>
3104+
</listitem>
3105+
30973106
<listitem>
30983107
<para>
30993108
You can overload function names in <productname>PostgreSQL</>. This is
@@ -3111,7 +3120,7 @@ AFTER INSERT OR UPDATE OR DELETE ON sales_fact
31113120

31123121
<listitem>
31133122
<para>
3114-
In <productname>PostgreSQL</> the function body has to be written as
3123+
In <productname>PostgreSQL</> the function body must be written as
31153124
a string literal. Therefore you need to use dollar quoting or escape
31163125
single quotes in the function body. See <xref
31173126
linkend="plpgsql-quote-tips">.
@@ -3128,10 +3137,11 @@ AFTER INSERT OR UPDATE OR DELETE ON sales_fact
31283137
<listitem>
31293138
<para>
31303139
Since there are no packages, there are no package-level variables
3131-
either. This is somewhat annoying. You may be able to keep per-session
3132-
state in temporary tables, instead.
3140+
either. This is somewhat annoying. You can keep per-session state
3141+
in temporary tables instead.
31333142
</para>
31343143
</listitem>
3144+
31353145
</itemizedlist>
31363146
</para>
31373147

0 commit comments

Comments
 (0)