Changeset 34 for hw

Show
Ignore:
Timestamp:
09/25/07 03:27:55 (5 years ago)
Author:
cs186
Message:

Set up near-neighbor operator

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

Legend:

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

    r23 r34  
    613613                                                                                                        PointerGetDatum(query))); 
    614614                        break; 
     615                case RTNearNeighborStrategyNumber: 
     616                        retval = TRUE; 
     617                        break; 
    615618                default: 
    616619                        retval = FALSE; 
     
    703706                                                                                                           PointerGetDatum(key), 
    704707                                                                                                        PointerGetDatum(query))); 
     708                        break; 
     709                case RTNearNeighborStrategyNumber: 
     710                        retval = TRUE; 
    705711                        break; 
    706712                default: 
  • hw/hw2/postgresql-8.2.4/src/include/access/gist.h

    r23 r34  
    5454#define RTOldContainsStrategyNumber             13              /* for old spelling of @> */ 
    5555#define RTOldContainedByStrategyNumber  14              /* for old spelling of <@ */ 
     56#define RTNearNeighborStrategyNumber 15 /* for ~~ */ 
    5657 
    5758/* 
  • hw/hw2/postgresql-8.2.4/src/include/catalog/pg_amop.h

    r22 r34  
    614614DATA(insert (   2593    0 13 f  2863 )); 
    615615DATA(insert (   2593    0 14 f  2862 )); 
     616DATA(insert (   2593    0 15 f  2880 )); 
    616617 
    617618/* 
  • hw/hw2/postgresql-8.2.4/src/include/catalog/pg_operator.h

    r23 r34  
    904904DATA(insert OID = 2877 (  "~"      PGNSP PGUID b f 1034 1033     16 0 0 0 0 0 0 aclcontains - - )); 
    905905 
    906 /* mindist function for near-neighbor search on boxes */ 
    907 DATA(insert OID = 2880 (  "~~"     PGNSP PGUID b f 603 603      16       0       0       0       0       0       0 box_mindistance positionsel positionjoinsel )); 
     906/* truth predicate for near-neighbor search */ 
     907DATA(insert OID = 2880 (  "~~"     PGNSP PGUID b f 603 603      16       0       0       0       0       0       0 box_true truesel truesel )); 
    908908 
    909909/* 
  • hw/hw2/postgresql-8.2.4/src/include/catalog/pg_proc.h

    r23 r34  
    39803980DATA(insert OID = 2895 (  gist_infinite_mindistance        PGNSP PGUID 12 f f t f i 2 701 "2281 603" _null_ _null_ _null_       gist_infinite_mindistance - _null_ )); 
    39813981DESCR("gist support"); 
     3982DATA(insert OID = 2896 (  box_true         PGNSP PGUID 12 f f t f i 2 701 "603 603" _null_ _null_ _null_        box_true - _null_ )); 
     3983DESCR("gist NN support"); 
     3984DATA(insert OID = 2897 (  truesel                  PGNSP PGUID 12 f f t f s 4 701 "2281 26 2281 23" _null_ _null_ _null_        truesel - _null_ )); 
     3985DESCR("gist NN support"); 
    39823986 
    39833987/* 
  • hw/hw2/postgresql-8.2.4/src/include/utils/geo_decls.h

    r23 r34  
    312312extern Datum box_mindistance(PG_FUNCTION_ARGS); 
    313313extern double box_mindist_internal(BOX *box1, BOX *box2); 
     314extern Datum box_true(PG_FUNCTION_ARGS); 
    314315 
    315316/* public path routines */ 
     
    433434extern Datum contsel(PG_FUNCTION_ARGS); 
    434435extern Datum contjoinsel(PG_FUNCTION_ARGS); 
     436extern Datum truesel(PG_FUNCTION_ARGS); 
    435437 
    436438#endif   /* GEO_DECLS_H */