Thread

  1. has anybody else used r-tree indexes in 6.5?

    Jeff Hoffmann <jeff@remapcorp.com> — 1999-06-18T19:13:06Z

    has something changed with r-tree indexes in 6.5?  i had a database in
    6.4.2 that had a box type and would do queries on it with the box
    overlap operator ("&&").  the field i'm querying is indexed with an
    r-tree index.  all this worked fine in 6.4.2.  then i did a dump &
    restore from 6.4.2 to 6.5 and now the queries that were running ok in
    6.4.2 aren't in 6.5.  if i drop the index, everything is fine (albeit
    slow).  this is the error i'm getting:
    
    ERROR:  Operator 500 must have a restriction selectivity estimator to be
    used in a btree index
    
    which doesn't make sense because it's an r-tree index, first of all. 
    and second, i don't know what to look for (especially since this was
    working great with 6.4.2).
    
    i'm running on a linux system, compiled with a pretty recent egcs.  the
    diffs in the regression tests didn't seem to be anything major.  the
    only configuration option i selected was --with-perl when i compiled it,
    so so everything should be pretty vanilla.  (i haven't even added in any
    of my custom types yet, which have been known to mess with operators in
    the past.)
    
    it's really easy to reproduce the error:
    
    create table test_table (area1 box);
    insert into test_table values ( '(100,100,200,200)'::box );
    create index test_table_index on test_table using rtree ( area1 box_ops
    );
    select * from test_table where area1 && '(0,0),(100,100)'::box;
    drop index test_table_index;
    select * from test_table where area1 && '(0,0),(100,100)'::box;
    
    any ideas?
    
    jeff
    
    ps, is it just me, or do things seem a little dead around here today?
    
    
  2. Re: [HACKERS] has anybody else used r-tree indexes in 6.5?

    Thomas Lockhart <lockhart@alumni.caltech.edu> — 1999-06-19T02:11:58Z

    > has something changed with r-tree indexes in 6.5?
    > any ideas?
    
    revision 1.29
    date: 1999/05/31 19:32:47;  author: tgl;  state: Exp;  lines: +61 -5
    Generate a more specific error message when an operator used
    in an index doesn't have a restriction selectivity estimator.
    
    Tom, was there anything more here than the new elog error exit itself?
    It used to ignore the missing estimator, or fail farther in to the
    code?
    
    > ps, is it just me, or do things seem a little dead around here today?
    
    At your office, or on the list? Most of us were waiting for your
    message ;)
    
                       - Thomas
    
    -- 
    Thomas Lockhart				lockhart@alumni.caltech.edu
    South Pasadena, California