summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorFujii Masao <fujii@postgresql.org>2014-10-10 03:18:01 +0900
committerFujii Masao <fujii@postgresql.org>2014-10-10 03:18:48 +0900
commita0c58b55220f190e8be9cfe0cadb4d478e13fac2 (patch)
tree5eb0f2d02727395d3a2b9a7a6a7853bbcb455da6 /doc
parent80ddb590b6729fb398cad00b0774f2d10e954b0d (diff)
downloadpostgresql-a0c58b55220f190e8be9cfe0cadb4d478e13fac2.tar.gz
Fix broken example in PL/pgSQL document.
Back-patch to all supported branches. Marti Raudsepp, per a report from Marko Tiikkaja
Diffstat (limited to 'doc')
-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 91fadb0f14..e0a2668079 100644
--- a/doc/src/sgml/plpgsql.sgml
+++ b/doc/src/sgml/plpgsql.sgml
@@ -487,8 +487,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>