Fix problem in which sloppily-coded test in ExecInitIndexScan would
Tom Lane <tgl@sss.pgh.pa.us>
Fix problem in which sloppily-coded test in ExecInitIndexScan would think that both sides of indexqual look like index keys. An example is create table inside (f1 float8 primary key); create table outside (g1 float8, g2 float8); select * from inside,outside where f1 = atan2(g1+1, g2); ERROR: ExecInitIndexScan: both left and right ops are rel-vars (note that failure is potentially platform-dependent). Solution is a cleanup I had had in mind to make anyway: functional index keys should be represented as Var nodes in the fixed indexqual, just like regular index keys.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/executor/nodeIndexscan.c | modified | +17 −46 |
| src/backend/optimizer/plan/createplan.c | modified | +19 −14 |