From: | Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | maillist(at)candle(dot)pha(dot)pa(dot)us (Bruce Momjian) |
Cc: | lockhart(at)alumni(dot)caltech(dot)edu, tgl(at)sss(dot)pgh(dot)pa(dot)us, hackers(at)postgreSQL(dot)org |
Subject: | Re: [HACKERS] Re: type coersion (was OR clause status) |
Date: | 1998-08-11 04:45:42 |
Message-ID: | 199808110445.AAA21081@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> #0 op_class (opno=1137, opclass=427, amopid=403) at lsyscache.c:58
> oideqint4 oid_ops btree_am_oid
>
>
> and it returns false because there is no access operator for oid_ops and
> btree_am_oid that matches oideqint4.
>
> The fundamental problem is that index scans are made to compare columns
> all of the same type. That is how indexes are built and traversed.
> Now, we want to bring in a constant of another type, and have it use an
> index.
>
> Sounds like if we add the proper pg_am functions for binary
> compatability, the optimizer should then use the proper indexes.
I think I have found part of the cause. We have duplicate type
conversion functions, and the parser is choosing the one that is not in
the access method tables.
---------------------------------------------------------------------------
test=> select * from pg_operator where oid = 1137;
oprname|oprowner|oprprec|oprkind|oprisleft|oprcanhash|oprleft|oprright|oprresult|oprcom|oprnegate|oprlsortop|oprrsortop|oprcode
|oprrest|oprjoin
-------+--------+-------+-------+---------+----------+-------+--------+---------+------+---------+----------+----------+---------+-------+---------
= | 139| 0|b |t |t | 26| 23|
16| 1136| 0| 0| 0|oideqint4|eqsel
|eqjoinsel (1 row)
test=> select * from pg_operator where oid = 932;
oprname|oprowner|oprprec|oprkind|oprisleft|oprcanhash|oprleft|oprright|oprresult|oprcom|oprnegate|oprlsortop|oprrsortop|oprcode
|oprrest |oprjoin
-------+--------+-------+-------+---------+----------+-------+--------+---------+------+---------+----------+----------+---------+--------+------------
= | 139| 0|b |t |f | 910| 910|
16| 932| 935| 0| 0|oidint4eq|intltsel|intltjoinsel (1 row)
t
--
Bruce Momjian | 830 Blythe Avenue
maillist(at)candle(dot)pha(dot)pa(dot)us | Drexel Hill, Pennsylvania 19026
+ If your life is a hard drive, | (610) 353-9879(w)
+ Christ can be your backup. | (610) 853-3000(h)
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 1998-08-11 05:08:29 | Re: [HACKERS] Re: type coersion (was OR clause status) |
Previous Message | Bruce Momjian | 1998-08-11 02:32:49 | new findoidjoins |