From: | Kevin Grittner <kgrittn(at)ymail(dot)com> |
---|---|
To: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi> |
Subject: | Re: [COMMITTERS] pgsql: Fix "element <@ range" cost estimation. |
Date: | 2013-03-21 15:20:11 |
Message-ID: | 1363879211.23559.YahooMailNeo@web162905.mail.bf1.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi> wrote:
> Fix "element <@ range" cost estimation.
>
> The statistics-based cost estimation patch for range types broke that, by
> incorrectly assuming that the left operand of all range oeprators is a
> range. That lead to a "type x is not a range type" error. Because it
> took so long for anyone to notice, add a regression test for that case.
>
> We still don't do proper statistics-based cost estimation for that, so you
> just get a default constant estimate. We should look into implementing that,
> but this patch at least fixes the regression.
Something is still wrong. When I run `make check-world` everything
passes, but `make installcheck-world` on a fresh initdb with
default configuration yields this:
*** /home/kgrittn/pg/master/src/test/regress/expected/rangetypes.out 2013-03-21 09:17:39.445690793 -0500
--- /home/kgrittn/pg/master/src/test/regress/results/rangetypes.out 2013-03-21 10:13:20.201683022 -0500
***************
*** 1048,1058 ****
create index test_range_elem_idx on test_range_elem (i);
insert into test_range_elem select i from generate_series(1,100) i;
select count(*) from test_range_elem where i <@ int4range(10,50);
! count
! -------
! 40
! (1 row)
!
drop table test_range_elem;
--
-- Btree_gist is not included by default, so to test exclusion
--- 1048,1054 ----
create index test_range_elem_idx on test_range_elem (i);
insert into test_range_elem select i from generate_series(1,100) i;
select count(*) from test_range_elem where i <@ int4range(10,50);
! ERROR: type 23 is not a range type
drop table test_range_elem;
--
-- Btree_gist is not included by default, so to test exclusion
======================================================================
--
Kevin Grittner
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Grittner | 2013-03-21 15:37:11 | pgsql: Eliminate trivial whitespace inconsistency in docs sample code. |
Previous Message | Heikki Linnakangas | 2013-03-21 09:23:28 | pgsql: Fix "element <@ range" cost estimation. |
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2013-03-21 16:14:21 | Re: [COMMITTERS] pgsql: Fix "element <@ range" cost estimation. |
Previous Message | Andrew Dunstan | 2013-03-21 15:18:04 | Re: hstore compiler warnings |