Re: Query not using index for user defined type

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Rodrigo Barboza <rodrigombufrj(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Query not using index for user defined type
Date: 2013-04-15 22:51:38
Message-ID: 10820.1366066298@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Rodrigo Barboza <rodrigombufrj(at)gmail(dot)com> writes:
> I created a implic cast for mytype to bigint.
> So when I do the same query it does seq scan, because the column is
> transformed into bigint.

Yeah. One reason why there's not an unsigned int type already is that
it seems impossible to shoehorn it into the numeric promotion hierarchy
without breaking a lot of existing cases. You definitely aren't likely
to get nice results by just adding some implicit casts without doing a
very careful design beforehand.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Rodrigo Barboza 2013-04-15 22:59:01 Re: Query not using index for user defined type
Previous Message Adrian Klaver 2013-04-15 21:57:12 Re: currval and DISCARD ALL