Hello hackers, I saw a recent submission: Teach planner how to estimate rows 
for timestamp generate_series. I provide a patch for the numeric type here, and 
a simple test is as follows:


postgres=# explain SELECT * FROM generate_series(-25.0, -1.0, 2.0);
                      
        QUERY PLAN           
                   
----------------------------------------------------------------------
 Function Scan on generate_series  (cost=0.00..0.13 rows=13 width=32)
(1 row)


postgres=# explain SELECT * FROM generate_series(-25.0, -1.0);    
                      
        QUERY PLAN           
                   
----------------------------------------------------------------------
 Function Scan on generate_series  (cost=0.00..0.25 rows=25 width=32)
(1 row)


postgres=#


I really want to know your thoughts, please give me feedback. Thank you.

Attachment: 0001-Added-prosupport-functions-for-estimating-numeric-ge.patch
Description: Binary data

Reply via email to