General Bug Report: prefix stringsearch doesn't return results
============================================================================
POSTGRESQL BUG REPORT TEMPLATE
============================================================================
Your name : Josef Moser
Your email address : jmoser@iicm.edu
Category : runtime: back-end: SQL
Severity : serious
Summary: prefix stringsearch doesn't return results
System Configuration
--------------------
Operating System : Linux 2.2.7 SUSE6.0; OSF1 V4.0 564 alpha
PostgreSQL version : snapshot from: ftp.postgresql.org (May 28 03:06) and (May 26 03:06)
Compiler used : Linux: egcs-2.91.60 ; dec: cc (Digital UNIX Compiler Driver 3.11)
Hardware:
---------
Pentium II (Deschutes), 512 MB Ram: Linux xfind 2.2.7 #4 SMP Tue May 4 14:21:58 MEST 1999 i686 unknown and
DEC ALPHA 248MB Ram : OSF1 www V4.0 564 alpha
Versions of other tools:
------------------------
linux:GNU Make version 3.76.1, flex version 2.5.4
dec:GNU Make version 3.74 ,flex version 2.5.4
--------------------------------------------------------------------------
Problem Description:
--------------------
the command SELECT * FROM test_t WHERE word LIKE 'hello%';
returns no results even when there are some hellos in the
database.
--------------------------------------------------------------------------
Test Case:
----------
CREATE TABLE bug_t(word TEXT);
INSERT INTO bug_t VALUES('hello1');
INSERT INTO bug_t VALUES('hello2');
SELECT * FROM bug_t where word like 'hello%';
-- returns 0 results.....
SELECT * FROM bug_t where word like '%hello%';
-- returns 2 results
--------------------------------------------------------------------------
Solution:
---------
--------------------------------------------------------------------------
On Fri, 28 May 1999, Unprivileged user wrote:
Date: Fri, 28 May 1999 07:32:22 -0400 (EDT)
From: Unprivileged user <nobody@hub.org>
Reply-To: Josef Moser <jmoser@iicm.edu>
To: pgsql-bugs@postgreSQL.org
Subject: [BUGS] General Bug Report: prefix stringsearch doesn't return results============================================================================
POSTGRESQL BUG REPORT TEMPLATE
============================================================================Your name : Josef Moser
Your email address : jmoser@iicm.eduCategory : runtime: back-end: SQL
Severity : seriousSummary: prefix stringsearch doesn't return results
System Configuration
--------------------
Operating System : Linux 2.2.7 SUSE6.0; OSF1 V4.0 564 alphaPostgreSQL version : snapshot from: ftp.postgresql.org (May 28 03:06) and (May 26 03:06)
Compiler used : Linux: egcs-2.91.60 ; dec: cc (Digital UNIX Compiler Driver 3.11)
Hardware:
---------
Pentium II (Deschutes), 512 MB Ram: Linux xfind 2.2.7 #4 SMP Tue May 4 14:21:58 MEST 1999 i686 unknown and
DEC ALPHA 248MB Ram : OSF1 www V4.0 564 alphaVersions of other tools:
------------------------
linux:GNU Make version 3.76.1, flex version 2.5.4
dec:GNU Make version 3.74 ,flex version 2.5.4--------------------------------------------------------------------------
Problem Description:
--------------------
the command SELECT * FROM test_t WHERE word LIKE 'hello%';
returns no results even when there are some hellos in the
database.--------------------------------------------------------------------------
Test Case:
----------
CREATE TABLE bug_t(word TEXT);
INSERT INTO bug_t VALUES('hello1');
INSERT INTO bug_t VALUES('hello2');
SELECT * FROM bug_t where word like 'hello%';
-- returns 0 results.....
SELECT * FROM bug_t where word like '%hello%';
-- returns 2 results
Hmm,
15:59[mira]:~/app/egcs/obj>psql test
Welcome to the POSTGRESQL interactive sql monitor:
Please read the file COPYRIGHT for copyright terms of POSTGRESQL
[PostgreSQL 6.5.0 on i586-pc-linux-gnulibc1, compiled by gcc egcs-2.91.66]
type \? for help on slash commands
type \q to quit
type \g or terminate with semicolon to execute query
You are currently connected to the database: test
test=> CREATE TABLE bug_t(word TEXT);
CREATE
test=> INSERT INTO bug_t VALUES('hello1');
INSERT 60937 1
test=> INSERT INTO bug_t VALUES('hello2');
INSERT 60938 1
test=> SELECT * FROM bug_t where word like 'hello%';
word
------
hello1
hello2
(2 rows)
test=> SELECT * FROM bug_t where word like '%hello%';
word
------
hello1
hello2
(2 rows)
No problem. This is Linux x86, 2.0.36, 6.5 current
Regards,
Oleg
--------------------------------------------------------------------------
Solution:
-----------------------------------------------------------------------------------
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83
"Oleg" == Oleg Bartunov <oleg@sai.msu.su> writes:
Oleg> On Fri, 28 May 1999, Unprivileged user wrote:
Date: Fri, 28 May 1999 07:32:22 -0400 (EDT)
From: Unprivileged user <nobody@hub.org>
Reply-To: Josef Moser <jmoser@iicm.edu>
To: pgsql-bugs@postgreSQL.org
Subject: [BUGS] General Bug Report: prefix stringsearch doesn't return results============================================================================
POSTGRESQL BUG REPORT TEMPLATE
============================================================================Your name : Josef Moser
Your email address : jmoser@iicm.eduCategory : runtime: back-end: SQL
Severity : seriousSummary: prefix stringsearch doesn't return results
Oleg> Hmm,
Oleg> 15:59[mira]:~/app/egcs/obj>psql test
Oleg> Welcome to the POSTGRESQL interactive sql monitor:
Oleg> Please read the file COPYRIGHT for copyright terms of POSTGRESQL
Oleg> [PostgreSQL 6.5.0 on i586-pc-linux-gnulibc1, compiled by gcc egcs-2.91.66]
Oleg> type \? for help on slash commands
Oleg> type \q to quit
Oleg> type \g or terminate with semicolon to execute query
Oleg> You are currently connected to the database: test
Oleg> test=> CREATE TABLE bug_t(word TEXT);
Oleg> CREATE
Oleg> test=> INSERT INTO bug_t VALUES('hello1');
Oleg> INSERT 60937 1
Oleg> test=> INSERT INTO bug_t VALUES('hello2');
Oleg> INSERT 60938 1
Oleg> test=> SELECT * FROM bug_t where word like 'hello%';
Oleg> word
Oleg> ------
Oleg> hello1
Oleg> hello2
Oleg> (2 rows)
Oleg> test=> SELECT * FROM bug_t where word like '%hello%';
Oleg> word
Oleg> ------
Oleg> hello1
Oleg> hello2
Oleg> (2 rows)
Oleg> No problem. This is Linux x86, 2.0.36, 6.5 current
Oleg> Regards,
Oleg> Oleg
hmm......
121>psql test
Welcome to the POSTGRESQL interactive sql monitor:
Please read the file COPYRIGHT for copyright terms of POSTGRESQL
[PostgreSQL 6.5.0 on i686-pc-linux-gnu, compiled by gcc egcs-2.91.60]
type \? for help on slash commands
type \q to quit
type \g or terminate with semicolon to execute query
You are currently connected to the database: test
test=> CREATE TABLE bug_t(word TEXT);
CREATE
test=> INSERT INTO bug_t VALUES('hello1');
INSERT 18633 1
test=> INSERT INTO bug_t VALUES('hello2');
INSERT 18634 1
test=> SELECT * FROM bug_t where word like 'hello%';
word
----
(0 rows)
test=> SELECT * FROM bug_t where word like '%hello%';
word
------
hello1
hello2
(2 rows)
Suppositions
Empty directories (I deleted all old postgres versions and all databases....)
postgres snapshot from
ftp.postgresql.org/pub/postgresql.snapshot.tar.gz
(dir says: -rw-r--r-- 1 1005 root 5969878 May 28 03:06
postgresql.snapshot.tar.gz)
uname -a
Linux xfind 2.2.7 #4 SMP Tue May 4 14:21:58 MEST 1999 i686 unknown
libc:
/lib/libc.so.6
ENVIRONMENT:
nearly bare...
PATH=/usr/lib/pgsql_6.5/bin/:/usr/bin/:/bin/
POSTMASTER command: postmaster -D /var/lib/pgsql_6.5/data/
Any hints where I sould start debugging would be greatly appreciated.
Ciao and Thanks
Joe
On Fri, 28 May 1999, Oleg Bartunov wrote:
On Fri, 28 May 1999, Unprivileged user wrote:
Date: Fri, 28 May 1999 07:32:22 -0400 (EDT)
From: Unprivileged user <nobody@hub.org>
Reply-To: Josef Moser <jmoser@iicm.edu>
To: pgsql-bugs@postgreSQL.org
Subject: [BUGS] General Bug Report: prefix stringsearch doesn't return results============================================================================
POSTGRESQL BUG REPORT TEMPLATE
============================================================================Your name : Josef Moser
Your email address : jmoser@iicm.eduCategory : runtime: back-end: SQL
Severity : seriousSummary: prefix stringsearch doesn't return results
System Configuration
--------------------
Operating System : Linux 2.2.7 SUSE6.0; OSF1 V4.0 564 alphaPostgreSQL version : snapshot from: ftp.postgresql.org (May 28 03:06) and (May 26 03:06)
Compiler used : Linux: egcs-2.91.60 ; dec: cc (Digital UNIX Compiler Driver 3.11)
Hardware:
---------
Pentium II (Deschutes), 512 MB Ram: Linux xfind 2.2.7 #4 SMP Tue May 4 14:21:58 MEST 1999 i686 unknown and
DEC ALPHA 248MB Ram : OSF1 www V4.0 564 alphaVersions of other tools:
------------------------
linux:GNU Make version 3.76.1, flex version 2.5.4
dec:GNU Make version 3.74 ,flex version 2.5.4--------------------------------------------------------------------------
Problem Description:
--------------------
the command SELECT * FROM test_t WHERE word LIKE 'hello%';
returns no results even when there are some hellos in the
database.--------------------------------------------------------------------------
Test Case:
----------
CREATE TABLE bug_t(word TEXT);
INSERT INTO bug_t VALUES('hello1');
INSERT INTO bug_t VALUES('hello2');
SELECT * FROM bug_t where word like 'hello%';
-- returns 0 results.....
SELECT * FROM bug_t where word like '%hello%';
-- returns 2 resultsHmm,
15:59[mira]:~/app/egcs/obj>psql test
Welcome to the POSTGRESQL interactive sql monitor:
Please read the file COPYRIGHT for copyright terms of POSTGRESQL
[PostgreSQL 6.5.0 on i586-pc-linux-gnulibc1, compiled by gcc egcs-2.91.66]type \? for help on slash commands
type \q to quit
type \g or terminate with semicolon to execute query
You are currently connected to the database: testtest=> CREATE TABLE bug_t(word TEXT);
CREATE
test=> INSERT INTO bug_t VALUES('hello1');
INSERT 60937 1
test=> INSERT INTO bug_t VALUES('hello2');
INSERT 60938 1
test=> SELECT * FROM bug_t where word like 'hello%';
word
------
hello1
hello2
(2 rows)
test=> SELECT * FROM bug_t where word like '%hello%';
word
------
hello1
hello2
(2 rows)No problem. This is Linux x86, 2.0.36, 6.5 current
Hmmmm....
psql
Welcome to the POSTGRESQL interactive sql monitor:
Please read the file COPYRIGHT for copyright terms of POSTGRESQL
[PostgreSQL 6.5.0 on i386-unknown-freebsd3.1, compiled by gcc 2.7.2.1]
type \? for help on slash commands
type \q to quit
type \g or terminate with semicolon to execute query
You are currently connected to the database: miker
miker=> CREATE TABLE bug_t(word TEXT);
CREATE
miker=> INSERT INTO bug_t VALUES('hello1');
INSERT 558121 1
miker=> INSERT INTO bug_t VALUES('hello2');
INSERT 558122 1
miker=> SELECT * FROM bug_t where word like 'hello%';
word
----
(0 rows)
miker=> SELECT * FROM bug_t where word like '%hello%';
word
------
hello1
hello2
(2 rows)
miker=> SELECT * FROM bug_t where word like 'hello_';
word
------
hello1
hello2
(2 rows)
-Michael