]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Fix broken example in PL/pgSQL document.
authorFujii Masao <fujii@postgresql.org>
Thu, 9 Oct 2014 18:18:01 +0000 (03:18 +0900)
committerFujii Masao <fujii@postgresql.org>
Thu, 9 Oct 2014 18:19:52 +0000 (03:19 +0900)
Back-patch to all supported branches.

Marti Raudsepp, per a report from Marko Tiikkaja

doc/src/sgml/plpgsql.sgml

index b3016aed54c3d1046eed5fc0617154e5dc66a4c4..f3e3f8e5def871623841c236ce06ab66a4f5bc03 100644 (file)
@@ -484,8 +484,8 @@ $$ LANGUAGE plpgsql;
 CREATE FUNCTION extended_sales(p_itemno int)
 RETURNS TABLE(quantity int, total numeric) AS $$
 BEGIN
-    RETURN QUERY SELECT quantity, quantity * price FROM sales
-                 WHERE itemno = p_itemno;
+    RETURN QUERY SELECT s.quantity, s.quantity * s.price FROM sales AS s
+                 WHERE s.itemno = p_itemno;
 END;
 $$ LANGUAGE plpgsql;
 </programlisting>