Skip to content

Commit f6bb48f

Browse files
committed
Fix broken example in PL/pgSQL document.
Back-patch to all supported branches. Marti Raudsepp, per a report from Marko Tiikkaja
1 parent 037b912 commit f6bb48f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/src/sgml/plpgsql.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,8 +486,8 @@ $$ LANGUAGE plpgsql;
486486
CREATE FUNCTION extended_sales(p_itemno int)
487487
RETURNS TABLE(quantity int, total numeric) AS $$
488488
BEGIN
489-
RETURN QUERY SELECT quantity, quantity * price FROM sales
490-
WHERE itemno = p_itemno;
489+
RETURN QUERY SELECT s.quantity, s.quantity * s.price FROM sales AS s
490+
WHERE s.itemno = p_itemno;
491491
END;
492492
$$ LANGUAGE plpgsql;
493493
</programlisting>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy