Re: [GENERAL] Question on RETURNS TABLE example in PostgreSQL documentation

2010-02-21 Thread Pavel Stehule
Hello 2010/2/22 Yan Cheng Cheok : > The following code snippet are picked from PostgreSQL documentation : > http://www.postgresql.org/docs/current/static/plpgsql-declarations.html > > CREATE FUNCTION extended_sales(p_itemno int) RETURNS TABLE(quantity int, > total numeric) AS $$ > BEGIN >    RETU

[GENERAL] Question on RETURNS TABLE example in PostgreSQL documentation

2010-02-21 Thread Yan Cheng Cheok
The following code snippet are picked from PostgreSQL documentation : http://www.postgresql.org/docs/current/static/plpgsql-declarations.html CREATE FUNCTION extended_sales(p_itemno int) RETURNS TABLE(quantity int, total numeric) AS $$ BEGIN RETURN QUERY SELECT quantity, quantity * price FROM