strange bug with gist over box and circle

Lists: pgsql-bugs
From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: strange bug with gist over box and circle
Date: 2009-09-16 04:45:32
Message-ID: 1253076332.24770.165.camel@jdavis
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

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"


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: strange bug with gist over box and circle
Date: 2009-09-16 14:36:17
Message-ID: 4431.1253111777@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Jeff Davis <pgsql(at)j-davis(dot)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


From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: strange bug with gist over box and circle
Date: 2009-09-16 18:43:36
Message-ID: 1253126616.29243.291.camel@monkey-cat.sm.truviso.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

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