Re: int8 primary keys still not using index without manual - Mailing list pgsql-general

From Tom Lane
Subject Re: int8 primary keys still not using index without manual
Date
Msg-id 280.1068227620@sss.pgh.pa.us
Whole thread Raw
In response to Re: int8 primary keys still not using index without manual  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
I said:
> So I'm currently thinking we'd be better off not to try to eliminate
> the cross-type comparison operators.  Instead we need some solution
> that is narrowly focused on the problem of making a non-indexable
> comparison indexable, by converting a comparison value of the wrong
> datatype into the right datatype locally to the indexscan plan
> generation code.

BTW, plan C would be to attack the problem head-on by allowing index
opclasses to include cross-datatype operators.  This might be the
cleanest solution in the long run, but it seems likely to be a lot of
work and could force us to break existing user-defined operator classes.
I think everyone has shied away from that without much thought, but
in principle at least we could probably do it.  (Say, extend pg_amop
and pg_amproc so that the datatype of the other operand becomes part
of the key.)

We are now well outside the charter of pgsql-general, so please redirect
any followup discussion to pgsql-hackers ...

            regards, tom lane

pgsql-general by date:

Previous
From: "Edwin Quijada"
Date:
Subject: Re: Service doesnt UP!!!!
Next
From: "Edwin Quijada"
Date:
Subject: Re: Service doesnt UP!!!!