Commit f19f0ee7 authored by Fujii Masao's avatar Fujii Masao

Fix broken example in PL/pgSQL document.

Back-patch to all supported branches.

Marti Raudsepp, per a report from Marko Tiikkaja
parent 7b1c2a0f
...@@ -487,8 +487,8 @@ $$ LANGUAGE plpgsql; ...@@ -487,8 +487,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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment