Re: BUG #4170: Rows estimation which are cast from TEXT is inaccurate. - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #4170: Rows estimation which are cast from TEXT is inaccurate.
Date
Msg-id 5605.1210866153@sss.pgh.pa.us
Whole thread Raw
In response to BUG #4170: Rows estimation which are cast from TEXT is inaccurate.  ("Tashuhito Kasahara" <kasahara.tatsuhito@oss.ntt.co.jp>)
Responses Re: BUG #4170: Rows estimation which are cast from TEXT is inaccurate.
List pgsql-bugs
"Tashuhito Kasahara" <kasahara.tatsuhito@oss.ntt.co.jp> writes:
> test=# EXPLAIN SELECT * FROM test WHERE t < '2008-05-14
> 23:55:00'::text::timestamp;
>                                  QUERY PLAN
> ----------------------------------------------------------------------------

>  Seq Scan on test  (cost=0.00..2209.00 rows=32133 width=12)  <- too little
> number of the estimates
>    Filter: (t < ('2008-05-14 23:55:00'::text)::timestamp without time zone)
> (2 rows)

Hmm ... as of 8.3 this will generate a CoerceViaIO node, and it looks
like I forgot to teach eval_const_expressions how to simplify those.

            regards, tom lane

pgsql-bugs by date:

Previous
From: John R Pierce
Date:
Subject: Re: BUG #4172: postgres stops working after restart
Next
From: "Chris West (Faux)"
Date:
Subject: BUG #4173: Illogical error message with aggregates + order by