pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedLike seems to fail !
3+ messages / 2 participants
[nested] [flat]
* Like seems to fail !
@ 2000-11-17 08:58 Yves Martin <yma@elca.ch>
0 siblings, 0 replies; 3+ messages in thread
From: Yves Martin @ 2000-11-17 08:58 UTC (permalink / raw)
To: pgsql-sql
Hello,
I have a strange problem with 'like' behaviour
when I upgrade from 6.5 to 7.0
Here is my table :
create table persistent_config (
key varchar primary key,
type varchar(12),
value varchar not null
)
and its content :
base=# select * from persistent_config;
key | type | value
------------+------+--------------
/test/info | | avalue
/try/info | | avalue
/test/key | | changedvalue
(3 rows)
And I try this 'like' command in psql :
base=# select * from persistent_config where key like '/test%';
key | type | value
------------+------+--------------
/test/info | | avalue
/test/key | | changedvalue
(2 rows)
Result is ok !
By now, this other one :
base=# select * from persistent_config where key like '/%';
key | type | value
-----+------+-------
(0 rows)
There is really something wrong ! All current content should have been
returned. Is '/' caracter a new 'escape' caracter since version 6.5
In fact, my query was working well on postgresql 6.5 and since I upgraded
to 7.0, this simple command failed.
Is it a bug, or I missed something ?
Regards
--
Yves Martin
yma, Lausanne
^ permalink raw reply [nested|flat] 3+ messages in thread
* Like seems to fail !
@ 2000-11-20 07:28 Yves Martin <yma@elca.ch>
0 siblings, 1 reply; 3+ messages in thread
From: Yves Martin @ 2000-11-20 07:28 UTC (permalink / raw)
To: pgsql-sql
Hello,
I have a strange problem with 'like' behaviour
when I upgrade from 6.5 to 7.0
Here is my table :
create table persistent_config (
key varchar primary key,
type varchar(12),
value varchar not null
)
and its content :
base=# select * from persistent_config;
key | type | value
------------+------+--------------
/test/info | | avalue
/try/info | | avalue
/test/key | | changedvalue
(3 rows)
And I try this 'like' command in psql :
base=# select * from persistent_config where key like '/test%';
key | type | value
------------+------+--------------
/test/info | | avalue
/test/key | | changedvalue
(2 rows)
Result is ok !
By now, this other one :
base=# select * from persistent_config where key like '/%';
key | type | value
-----+------+-------
(0 rows)
There is really something wrong ! All current content should have been
returned. Is '/' caracter a new 'escape' caracter since version 6.5
In fact, my query was working well on postgresql 6.5 and since I upgraded
to 7.0, this simple command failed.
Is it a bug, or I missed something ?
Regards,
--
Yves Martin
yma, Lausanne
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Like seems to fail !
@ 2000-11-20 15:53 Tom Lane <tgl@sss.pgh.pa.us>
parent: Yves Martin <yma@elca.ch>
0 siblings, 0 replies; 3+ messages in thread
From: Tom Lane @ 2000-11-20 15:53 UTC (permalink / raw)
To: Yves Martin <yma@elca.ch>; +Cc: pgsql-sql
Yves Martin <yma@elca.ch> writes:
> base=# select * from persistent_config where key like '/%';
> key | type | value
> -----+------+-------
> (0 rows)
What LOCALE are you running in? There are some known problems with
LIKE index optimization in some non-ASCII locales. If you drop
the index on persistent_config.key, does the problem disappear?
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2000-11-20 15:53 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-11-17 08:58 Like seems to fail ! Yves Martin <yma@elca.ch>
2000-11-20 07:28 Like seems to fail ! Yves Martin <yma@elca.ch>
2000-11-20 15:53 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox