mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +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:
		@@ -486,8 +486,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>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user