Changeset 39

Show
Ignore:
Timestamp:
09/25/07 04:17:21 (5 years ago)
Author:
cs186
Message:

Make sure to use box_distance at the leaves.

Location:
hw/hw2/postgresql-8.2.4/src
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • hw/hw2/postgresql-8.2.4/src/backend/access/gist/gistproc.c

    r34 r39  
    128128          PG_RETURN_FLOAT8(d); 
    129129        } 
    130         d = box_mindist_internal(DatumGetBoxP(entry->key), query); 
     130        /* 
     131         * if entry is not leaf, use box_mindist_internal, else use 
     132         * box_distance_internal 
     133         */ 
     134  if (GIST_LEAF(entry)) 
     135    d = box_distance_internal(DatumGetBoxP(entry->key), query); 
     136        else 
     137          d = box_mindist_internal(DatumGetBoxP(entry->key), query); 
    131138        PG_RETURN_FLOAT8(d); 
    132139} 
  • hw/hw2/postgresql-8.2.4/src/include/utils/geo_decls.h

    r34 r39  
    311311extern Datum box_div(PG_FUNCTION_ARGS); 
    312312extern Datum box_mindistance(PG_FUNCTION_ARGS); 
     313extern double box_distance_internal(BOX *box1, BOX *box2); 
    313314extern double box_mindist_internal(BOX *box1, BOX *box2); 
    314315extern Datum box_true(PG_FUNCTION_ARGS);