summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFujii Masao2014-10-09 18:18:01 +0000
committerFujii Masao2014-10-09 18:19:05 +0000
commitf6bb48f8bfe2ba622fcd5c11ccad92cea7ce0624 (patch)
tree6937f5d73c245afbd49edc881fe6d3058c9ce03f
parent037b912ecc87b4e6cdd933e23fc8ba5d3e45ec02 (diff)
Fix broken example in PL/pgSQL document.
Back-patch to all supported branches. Marti Raudsepp, per a report from Marko Tiikkaja
-rw-r--r--doc/src/sgml/plpgsql.sgml4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/src/sgml/plpgsql.sgml b/doc/src/sgml/plpgsql.sgml
index 0a9d71ef41a..d1d66c20935 100644
--- a/doc/src/sgml/plpgsql.sgml
+++ b/doc/src/sgml/plpgsql.sgml
@@ -486,8 +486,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>