Re: Query not using index for user defined type - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Query not using index for user defined type
Date
Msg-id 10820.1366066298@sss.pgh.pa.us
Whole thread Raw
In response to Re: Query not using index for user defined type  (Rodrigo Barboza <rodrigombufrj@gmail.com>)
Responses Re: Query not using index for user defined type
List pgsql-hackers
Rodrigo Barboza <rodrigombufrj@gmail.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



pgsql-hackers by date:

Previous
From: "anarazel@anarazel.de"
Date:
Subject: Re: Why are JSON extraction functions STABLE and not IMMUTABLE?
Next
From: Rodrigo Barboza
Date:
Subject: Re: Query not using index for user defined type