Re: [HACKERS] Oversight in CREATE FUNCTION + EXPLAIN?

2009-11-18 Thread Tom Lane
"Joshua D. Drake" writes: > Shouldn't the estimated rows be 50? It is if you do "select * from return_lots(1000)". regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org

[HACKERS] Oversight in CREATE FUNCTION + EXPLAIN?

2009-11-18 Thread Joshua D. Drake
Hey, So I ran across this today: CREATE OR REPLACE FUNCTION RETURN_LOTS(INT) RETURNS SETOF INT AS $$ SELECT generate_series(1,$1); $$ COST 0.5 ROWS 50 SET work_mem TO '5MB' LANGUAGE 'SQL'; postgres=# explain analyze select return_lots(1000); QUERY PLAN