like-operator on index-scan - Mailing list pgsql-hackers

From Andreas Degert
Subject like-operator on index-scan
Date
Msg-id 87snr47knt.fsf@tarzan.noname
Whole thread Raw
Responses Re: like-operator on index-scan
List pgsql-hackers
Hello,

I'd like to know if anyone can reproduce a strange error in V7.02
(debian i386). It happens when an index-scan is done in an index with
more than 80 entries, using a like-match, where the %-wildcard
directly follows a '/'. A simple example (which creates a database
testdb) is appended. In my installation the first count is 99, the
second 0.

ciao
Andreas

#! /bin/sh
set -e
psql <<.
\set ON_ERROR_STOP 1
create database testdb;
\c testdb
create table test (a text);
.
i=1
while test $i -lt 100; do echo "insert into test values('/a');" i=`expr $i + 1`
done | psql -d testdb
psql -d testdb <<.
select count(*) from test where a like '/%';
create index test1 on test(a);
select count(*) from test where a like '/%';
\c template1
drop database testdb;


pgsql-hackers by date:

Previous
From: Zeugswetter Andreas SB
Date:
Subject: AW: Status of new relation file naming
Next
From: Andreas Degert
Date:
Subject: null in constraints