Re: Range Types - cache lookup failed for function

Поиск
Список
Период
Сортировка
От Erik Rijkers
Тема Re: Range Types - cache lookup failed for function
Дата
Msg-id d11842549594d7aa797fa86dd82c937f.squirrel@webmail.xs4all.nl
обсуждение исходный текст
Ответ на Range Types  (Jeff Davis <pgsql@j-davis.com>)
Ответы Re: Range Types - cache lookup failed for function  (Jeff Davis <pgsql@j-davis.com>)
Список pgsql-hackers
On Sun, February 6, 2011 07:41, Jeff Davis wrote:
> New patch. All known TODO items are closed, although I should do a



I've been testing and find the patch to be
generally very stable.

More review follows ASAP, but I wanted to mention
this curious 'bug' already.

(below all with latest git + patch 2011.02.05; but
occurred also in 2011.01.30 version)

I was trying   where intrange @> integer

which admittedly is not in the documentation,
but does already half work, and would be really
convenient to have.  As it stands the construct
seems to fail after ANALYZE, when there is more
than 1 row:

-- file t/cache_lookup_failure2.sql
drop table if exists t;
create table t (ir int4range);
insert into t values (range(1,11));
select count(*) from t;
select * from t where ir @> 5; --> OK
analyze t;
select * from t where ir @> 5; --> OK
insert into t values (range(1,11));
select * from t where ir @> 5;
analyze t;
select * from t where ir @> 5;
------------------------
running that file gives me

PGPORT=6563
PGDATA=/var/data1/pg_stuff/pg_installations/pgsql.range_types/data
PGDATABASE=testdb

2011.02.06 20:03:03 rijkers@denkraam:/var/data1/pg_stuff/pg_sql/pgsql.range_types [0]
$ clear; psql -Xqa -d testdb -f t/cache_lookup_failure2.sql
drop table if exists t;
create table t (ir int4range);
insert into t values (range(1,11));
select count(*) from t;count
-------    1
(1 row)

select * from t where ir @> 5; --> OK   ir
-----------[ 1, 11 )
(1 row)

analyze t;
select * from t where ir @> 5; --> OK   ir
-----------[ 1, 11 )
(1 row)

insert into t values (range(1,11));
select * from t where ir @> 5;   ir
-----------[ 1, 11 )[ 1, 11 )
(2 rows)

analyze t;
select * from t where ir @> 5;
psql:t/cache_lookup_failure2.sql:11: ERROR:  cache lookup failed for function 0


(of course I realize that  ... WHERE ir @> range(5);
"fixes" the problem, but it would be
really nice to have it work on integers)

Thanks,

Erik Rijkers





В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: SSI patch version 14
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: SSI patch version 14