1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-20 05:03:10 +03:00

Fix broken example in PL/pgSQL document.

Back-patch to all supported branches.

Marti Raudsepp, per a report from Marko Tiikkaja
This commit is contained in:
Fujii Masao
2014-10-10 03:18:01 +09:00
parent d9a1e9de54
commit 0fbb1728b5

View File

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