Re: index on user defined type - Mailing list pgsql-general

From Tom Lane
Subject Re: index on user defined type
Date
Msg-id 1614.1105566193@sss.pgh.pa.us
Whole thread Raw
In response to index on user defined type  (Jeff Davis <jdavis-pgsql@empires.org>)
Responses Re: index on user defined type  (Michael Fuhr <mike@fuhr.org>)
Re: index on user defined type  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
List pgsql-general
Jeff Davis <jdavis-pgsql@empires.org> writes:
> I think I created a type that was compatible with the btree index, and
> everything seems fine, except that it doesn't actually use the index. I
> created the operators and the opclass as well.

> => explain select * from test where t = '(2)';
>                              QUERY PLAN
> ---------------------------------------------------------------------
>  Seq Scan on test  (cost=100000000.00..100000002.54 rows=1 width=32)
>    Filter: ((t).i = ('(2)'::type2).i)
> (2 rows)

The explain doesn't seem to quite match up with what you wrote in the
command.  How did those ".i" qualifiers get in there?

            regards, tom lane

pgsql-general by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: Postgresql Text field / Visual FoxPro Memo and ODBC
Next
From: MargaretGillon@chromalloy.com
Date:
Subject: Re: Postgresql Text field / Visual FoxPro Memo and ODBC