From: Fujii Masao Date: Thu, 9 Oct 2014 18:18:01 +0000 (+0900) Subject: Fix broken example in PL/pgSQL document. X-Git-Tag: REL9_0_19~78 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0fbb1728b5e5218cfa80facff092e225096ae315;p=thirdparty%2Fpostgresql.git Fix broken example in PL/pgSQL document. Back-patch to all supported branches. Marti Raudsepp, per a report from Marko Tiikkaja --- diff --git a/doc/src/sgml/plpgsql.sgml b/doc/src/sgml/plpgsql.sgml index b3016aed54c..f3e3f8e5def 100644 --- a/doc/src/sgml/plpgsql.sgml +++ b/doc/src/sgml/plpgsql.sgml @@ -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;