mirror of
				https://github.com/postgres/postgres.git
				synced 2025-10-28 11:55:03 +03:00 
			
		
		
		
	Add documentation about the inability of plpsql to use parameter names
that are the same as column names used in the function.
This commit is contained in:
		| @@ -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">  | <chapter id="plpgsql">  | ||||||
| @@ -3094,6 +3094,15 @@ AFTER INSERT OR UPDATE OR DELETE ON sales_fact | |||||||
|       </para> |       </para> | ||||||
|      </listitem> |      </listitem> | ||||||
|  |  | ||||||
|  |      <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> |      <listitem> | ||||||
|       <para> |       <para> | ||||||
|        You can overload function names in <productname>PostgreSQL</>. This is |        You can overload function names in <productname>PostgreSQL</>. This is | ||||||
| @@ -3111,7 +3120,7 @@ AFTER INSERT OR UPDATE OR DELETE ON sales_fact | |||||||
|  |  | ||||||
|      <listitem> |      <listitem> | ||||||
|       <para> |       <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 |        a string literal.  Therefore you need to use dollar quoting or escape | ||||||
|        single quotes in the function body. See <xref |        single quotes in the function body. See <xref | ||||||
|        linkend="plpgsql-quote-tips">. |        linkend="plpgsql-quote-tips">. | ||||||
| @@ -3128,10 +3137,11 @@ AFTER INSERT OR UPDATE OR DELETE ON sales_fact | |||||||
|      <listitem> |      <listitem> | ||||||
|       <para> |       <para> | ||||||
|        Since there are no packages, there are no package-level variables |        Since there are no packages, there are no package-level variables | ||||||
|        either. This is somewhat annoying.  You may be able to keep per-session |        either. This is somewhat annoying.  You can keep per-session state  | ||||||
|        state in temporary tables, instead. |        in temporary tables instead. | ||||||
|       </para> |       </para> | ||||||
|      </listitem> |      </listitem> | ||||||
|  |  | ||||||
|     </itemizedlist> |     </itemizedlist> | ||||||
|    </para> |    </para> | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user