From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Soroosh Sardari <soroosh(dot)sardari(at)gmail(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Planner issue |
Date: | 2013-10-14 07:25:06 |
Message-ID: | 5115.1381735506@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Soroosh Sardari <soroosh(dot)sardari(at)gmail(dot)com> writes:
> I developed a new character string type, named myvarchar.
> Also an operator class for btree is added.
> PROBLEM:
> When I executed a query with where clause on 'mine' column, PG does not use
> index.
Most likely you got the opclass definition wrong. Since you've shown us
no details of what you did, it's hard to speculate about just how. But
note that varchar itself is a pretty bad model for a user-added datatype,
because it has a special symbiotic relationship with type "text" (to wit,
it has no operators of its own but uses text's operators via implicit
casts). To get to a working independent datatype like this, you'd need
to pick the right aspects of each of text and varchar to clone. So my
unfounded speculation is you didn't do that just right.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | David Rowley | 2013-10-14 08:45:07 | Re: [PATCH] Add use of asprintf() |
Previous Message | Soroosh Sardari | 2013-10-14 07:21:23 | Fwd: Planner issue |