strange bug with gist over box and circle

Started by Jeff Davisover 16 years ago3 messagesbugs
Jump to latest
#1Jeff Davis
pgsql@j-davis.com

If I create a gist index over a box and a circle, the index attributes
appear to both have type box.

I don't see any other, similar situations with other types, and I
haven't investigated the cause yet. Most similar situations work fine.

Regards,
Jeff Davis

postgres=# select version();

version
------------------------------------------------------------------------------------------------------
PostgreSQL 8.5alpha1 on x86_64-unknown-linux-gnu, compiled by GCC gcc
(Debian 4.3.4-2) 4.3.4, 64-bit
(1 row)

postgres=# create table foo5(b box, c circle);
CREATE TABLE
postgres=# create index foo5_idx on foo5 using gist (b,c);
CREATE INDEX
postgres=# \d foo5
Table "public.foo5"
Column | Type | Modifiers
--------+--------+-----------
b | box |
c | circle |
Indexes:
"foo5_idx" gist (b, c)

postgres=# \d foo5_idx
Index "public.foo5_idx"
Column | Type | Definition
--------+------+------------
b | box | b
c | box | c
gist, for table "public.foo5"

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Jeff Davis (#1)
Re: strange bug with gist over box and circle

Jeff Davis <pgsql@j-davis.com> writes:

If I create a gist index over a box and a circle, the index attributes
appear to both have type box.

This is expected, no? Those opclasses use the STORAGE option.

regards, tom lane

#3Jeff Davis
pgsql@j-davis.com
In reply to: Tom Lane (#2)
Re: strange bug with gist over box and circle

On Wed, 2009-09-16 at 10:36 -0400, Tom Lane wrote:

This is expected, no? Those opclasses use the STORAGE option.

I see, that makes sense. I was making the assumption that the types
matched in my new patch, and obviously that's incorrect.

Regards,
Jeff Davis