pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedproblem with select where like ']'
10+ messages / 7 participants
[nested] [flat]
* problem with select where like ']'
@ 2000-10-17 19:02 hubert depesz lubaczewski <depesz@depesz.pl>
2000-10-17 19:33 ` Re: problem with select where like ']' Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 10+ messages in thread
From: hubert depesz lubaczewski @ 2000-10-17 19:02 UTC (permalink / raw)
To: pgsql-sql
hi,
i have a table (view actually) which contains field "article_name" which is
written like:
[AGD]|[Kuchenki Mikrofalowe]|[Samsung AKMS1]
i.e. some string within "[]" delimited by "|"
i want to select all record that have "[AGD]|[" in front of them
so i tried
select * from my_view where article_name like '[AGD]|[';
this doesn't work. no errors, but no tuples returned.
i checked that the problem is character ']'.
'[' works o.k. '|' - i guess works too.
but inserting "]" makes the whole expression doesn't work
i tried escaping of it like
\], \\]
or even
\\\]
but none of these worked.
right now i'm using comparison:
where substring (...) = '...' and it works even with those "]" signs.
but i'm just wondering why like ']' doesn't work.
any ideas?
depesz
p.s. sorry for my english.
--
hubert depesz lubaczewski <=--=> adres www usuniêty na pro¶bê Asi ¦l.
------------------------------------------------------------------------
najwspanialsz± rzecz± jak± da³o nam nowoczesne spo³eczeñstwo,
jest niesamowita wrêcz ³atwo¶æ unikania kontaktów z nim ...
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: problem with select where like ']'
2000-10-17 19:02 problem with select where like ']' hubert depesz lubaczewski <depesz@depesz.pl>
@ 2000-10-17 19:33 ` Tom Lane <tgl@sss.pgh.pa.us>
2000-10-17 20:07 ` Re: problem with select where like ']' KuroiNeko <evpopkov@carrier.kiev.ua>
2000-10-17 22:43 ` Re: problem with select where like ']' Joseph Shraibman <jks@selectacast.net>
0 siblings, 2 replies; 10+ messages in thread
From: Tom Lane @ 2000-10-17 19:33 UTC (permalink / raw)
To: depesz@depesz.pl; +Cc: pgsql-sql
hubert depesz lubaczewski <depesz@depesz.pl> writes:
> but i'm just wondering why like ']' doesn't work.
What LOCALE setting are you running the postmaster in?
']' is not a special character as far as LIKE is concerned, but
I suspect you may be seeing another variant of the problems that
LIKE index optimization has with peculiar collation rules.
You can find plenty of discussion of this in the mailing list archives
:-(
If there is an index on the field you are doing LIKE on, try dropping
the index to see if that makes the problem go away.
Another possibility is that you have been careless about always starting
the postmaster with the same LOCALE setting, in which case the index
may actually be corrupt (out of order) due to different records having
been inserted with different ideas about what the sort ordering should be.
In that case, dropping and recreating the index should help.
regards, tom lane
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: problem with select where like ']'
2000-10-17 19:02 problem with select where like ']' hubert depesz lubaczewski <depesz@depesz.pl>
2000-10-17 19:33 ` Re: problem with select where like ']' Tom Lane <tgl@sss.pgh.pa.us>
@ 2000-10-17 20:07 ` KuroiNeko <evpopkov@carrier.kiev.ua>
1 sibling, 0 replies; 10+ messages in thread
From: KuroiNeko @ 2000-10-17 20:07 UTC (permalink / raw)
To: pgsql-sql
> hubert depesz lubaczewski <depesz@depesz.pl> writes:
> > but i'm just wondering why like ']' doesn't work.
>
> What LOCALE setting are you running the postmaster in?
>
> ']' is not a special character as far as LIKE is concerned, but
> I suspect you may be seeing another variant of the problems that
> LIKE index optimization has with peculiar collation rules.
OTOH, it seems like it shouldn't return any rows, as the original
statement has no metacharachters, % or _
--
Well I tried to be meek
And I have tried to be mild
But I spat like a woman
And I sulked like a child
I have lived behind the walls
That have made me alone
Striven for peace
Which I never have known
Dire Straits, Brothers In Arms, The Man's Too Strong (Knopfler)
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: problem with select where like ']'
2000-10-17 19:02 problem with select where like ']' hubert depesz lubaczewski <depesz@depesz.pl>
2000-10-17 19:33 ` Re: problem with select where like ']' Tom Lane <tgl@sss.pgh.pa.us>
@ 2000-10-17 22:43 ` Joseph Shraibman <jks@selectacast.net>
2000-10-17 23:29 ` Re: problem with select where like ']' Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 1 reply; 10+ messages in thread
From: Joseph Shraibman @ 2000-10-17 22:43 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-sql
Tom Lane wrote:
>
> hubert depesz lubaczewski <depesz@depesz.pl> writes:
> > but i'm just wondering why like ']' doesn't work.
>
> What LOCALE setting are you running the postmaster in?
>
> ']' is not a special character as far as LIKE is concerned, but
> I suspect you may be seeing another variant of the problems that
> LIKE index optimization has with peculiar collation rules.
> You can find plenty of discussion of this in the mailing list archives
> :-(
>
WHAT mailing list archives?
They aren't linked to anywhere on www.postgresql.org that I can find.
--
Joseph Shraibman
jks@selectacast.net
Increase signal to noise ratio. http://www.targabot.com
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: problem with select where like ']'
2000-10-17 19:02 problem with select where like ']' hubert depesz lubaczewski <depesz@depesz.pl>
2000-10-17 19:33 ` Re: problem with select where like ']' Tom Lane <tgl@sss.pgh.pa.us>
2000-10-17 22:43 ` Re: problem with select where like ']' Joseph Shraibman <jks@selectacast.net>
@ 2000-10-17 23:29 ` Tom Lane <tgl@sss.pgh.pa.us>
2000-10-17 23:43 ` Re: problem with select where like ']' Bruce Momjian <pgman@candle.pha.pa.us>
0 siblings, 1 reply; 10+ messages in thread
From: Tom Lane @ 2000-10-17 23:29 UTC (permalink / raw)
To: Joseph Shraibman <jks@selectacast.net>; +Cc: pgsql-sql
Joseph Shraibman <jks@selectacast.net> writes:
> WHAT mailing list archives?
> They aren't linked to anywhere on www.postgresql.org that I can find.
Hmm. My bookmark is
http://www.postgresql.org/lists/mailing-list.html
Dunno how to get there from the site toplevel...
regards, tom lane
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: problem with select where like ']'
2000-10-17 19:02 problem with select where like ']' hubert depesz lubaczewski <depesz@depesz.pl>
2000-10-17 19:33 ` Re: problem with select where like ']' Tom Lane <tgl@sss.pgh.pa.us>
2000-10-17 22:43 ` Re: problem with select where like ']' Joseph Shraibman <jks@selectacast.net>
2000-10-17 23:29 ` Re: problem with select where like ']' Tom Lane <tgl@sss.pgh.pa.us>
@ 2000-10-17 23:43 ` Bruce Momjian <pgman@candle.pha.pa.us>
2000-10-17 23:53 ` Re: problem with select where like ']' Joseph Shraibman <jks@selectacast.net>
2000-10-18 00:00 ` Re: problem with select where like ']' Vince Vielhaber <vev@michvhf.com>
0 siblings, 2 replies; 10+ messages in thread
From: Bruce Momjian @ 2000-10-17 23:43 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Joseph Shraibman <jks@selectacast.net>; pgsql-sql; PostgreSQL Webmaster <webmaster@postgresql.org>
The fact is, I can't figure out how to get there without the URL.
> Joseph Shraibman <jks@selectacast.net> writes:
> > WHAT mailing list archives?
> > They aren't linked to anywhere on www.postgresql.org that I can find.
>
> Hmm. My bookmark is
>
> http://www.postgresql.org/lists/mailing-list.html
>
> Dunno how to get there from the site toplevel...
>
> regards, tom lane
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: problem with select where like ']'
2000-10-17 19:02 problem with select where like ']' hubert depesz lubaczewski <depesz@depesz.pl>
2000-10-17 19:33 ` Re: problem with select where like ']' Tom Lane <tgl@sss.pgh.pa.us>
2000-10-17 22:43 ` Re: problem with select where like ']' Joseph Shraibman <jks@selectacast.net>
2000-10-17 23:29 ` Re: problem with select where like ']' Tom Lane <tgl@sss.pgh.pa.us>
2000-10-17 23:43 ` Re: problem with select where like ']' Bruce Momjian <pgman@candle.pha.pa.us>
@ 2000-10-17 23:53 ` Joseph Shraibman <jks@selectacast.net>
2000-10-18 15:24 ` Re: problem with select where like ']' Peter Eisentraut <peter_e@gmx.net>
1 sibling, 1 reply; 10+ messages in thread
From: Joseph Shraibman @ 2000-10-17 23:53 UTC (permalink / raw)
To: PostgreSQL Webmaster <webmaster@postgresql.org>; +Cc: pgsql-sql
The only way I can find is to do a search on something, and select to
search in mailing lists. Then after the search returns click on a link,
and trucate the url to http://www.postgresql.org/mhonarc/
Bruce Momjian wrote:
>
> The fact is, I can't figure out how to get there without the URL.
>
> > Joseph Shraibman <jks@selectacast.net> writes:
> > > WHAT mailing list archives?
> > > They aren't linked to anywhere on www.postgresql.org that I can find.
> >
> > Hmm. My bookmark is
> >
> > http://www.postgresql.org/lists/mailing-list.html
> >
> > Dunno how to get there from the site toplevel...
> >
> > regards, tom lane
> >
>
> --
> Bruce Momjian | http://candle.pha.pa.us
> pgman@candle.pha.pa.us | (610) 853-3000
> + If your life is a hard drive, | 830 Blythe Avenue
> + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
--
Joseph Shraibman
jks@selectacast.net
Increase signal to noise ratio. http://www.targabot.com
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: problem with select where like ']'
2000-10-17 19:02 problem with select where like ']' hubert depesz lubaczewski <depesz@depesz.pl>
2000-10-17 19:33 ` Re: problem with select where like ']' Tom Lane <tgl@sss.pgh.pa.us>
2000-10-17 22:43 ` Re: problem with select where like ']' Joseph Shraibman <jks@selectacast.net>
2000-10-17 23:29 ` Re: problem with select where like ']' Tom Lane <tgl@sss.pgh.pa.us>
2000-10-17 23:43 ` Re: problem with select where like ']' Bruce Momjian <pgman@candle.pha.pa.us>
2000-10-17 23:53 ` Re: problem with select where like ']' Joseph Shraibman <jks@selectacast.net>
@ 2000-10-18 15:24 ` Peter Eisentraut <peter_e@gmx.net>
0 siblings, 0 replies; 10+ messages in thread
From: Peter Eisentraut @ 2000-10-18 15:24 UTC (permalink / raw)
To: Joseph Shraibman <jks@selectacast.net>; +Cc: PostgreSQL Webmaster <webmaster@postgresql.org>; pgsql-sql
Joseph Shraibman writes:
> The only way I can find is to do a search on something, and select to
> search in mailing lists. Then after the search returns click on a link,
> and trucate the url to http://www.postgresql.org/mhonarc/
When in doubt, use geocrawler.com.
--
Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: problem with select where like ']'
2000-10-17 19:02 problem with select where like ']' hubert depesz lubaczewski <depesz@depesz.pl>
2000-10-17 19:33 ` Re: problem with select where like ']' Tom Lane <tgl@sss.pgh.pa.us>
2000-10-17 22:43 ` Re: problem with select where like ']' Joseph Shraibman <jks@selectacast.net>
2000-10-17 23:29 ` Re: problem with select where like ']' Tom Lane <tgl@sss.pgh.pa.us>
2000-10-17 23:43 ` Re: problem with select where like ']' Bruce Momjian <pgman@candle.pha.pa.us>
@ 2000-10-18 00:00 ` Vince Vielhaber <vev@michvhf.com>
2000-10-18 00:05 ` Re: problem with select where like ']' Bruce Momjian <pgman@candle.pha.pa.us>
1 sibling, 1 reply; 10+ messages in thread
From: Vince Vielhaber @ 2000-10-18 00:00 UTC (permalink / raw)
To: Bruce Momjian <pgman@candle.pha.pa.us>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; Joseph Shraibman <jks@selectacast.net>; pgsql-sql; PostgreSQL Webmaster <webmaster@postgresql.org>
http://www.postgresql.org/users-lounge/index.html has most of them.
Actually it's under General Info from the user's lounge.
It was brought to my attention today that the list of archives was
incomplete so I'll be adding to it and adding another one (developer
and user). Don't get too attached to the url below, it will be going
away very soon.
Vince.
On Tue, 17 Oct 2000, Bruce Momjian wrote:
> The fact is, I can't figure out how to get there without the URL.
>
>
> > Joseph Shraibman <jks@selectacast.net> writes:
> > > WHAT mailing list archives?
> > > They aren't linked to anywhere on www.postgresql.org that I can find.
> >
> > Hmm. My bookmark is
> >
> > http://www.postgresql.org/lists/mailing-list.html
> >
> > Dunno how to get there from the site toplevel...
> >
> > regards, tom lane
> >
>
>
>
--
==========================================================================
Vince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net
128K ISDN from $22.00/mo - 56K Dialup from $16.00/mo at Pop4 Networking
Online Campground Directory http://www.camping-usa.com
Online Giftshop Superstore http://www.cloudninegifts.com
==========================================================================
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: problem with select where like ']'
2000-10-17 19:02 problem with select where like ']' hubert depesz lubaczewski <depesz@depesz.pl>
2000-10-17 19:33 ` Re: problem with select where like ']' Tom Lane <tgl@sss.pgh.pa.us>
2000-10-17 22:43 ` Re: problem with select where like ']' Joseph Shraibman <jks@selectacast.net>
2000-10-17 23:29 ` Re: problem with select where like ']' Tom Lane <tgl@sss.pgh.pa.us>
2000-10-17 23:43 ` Re: problem with select where like ']' Bruce Momjian <pgman@candle.pha.pa.us>
2000-10-18 00:00 ` Re: problem with select where like ']' Vince Vielhaber <vev@michvhf.com>
@ 2000-10-18 00:05 ` Bruce Momjian <pgman@candle.pha.pa.us>
0 siblings, 0 replies; 10+ messages in thread
From: Bruce Momjian @ 2000-10-18 00:05 UTC (permalink / raw)
To: Vince Vielhaber <vev@michvhf.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; Joseph Shraibman <jks@selectacast.net>; pgsql-sql; PostgreSQL Webmaster <webmaster@postgresql.org>
>
> http://www.postgresql.org/users-lounge/index.html has most of them.
> Actually it's under General Info from the user's lounge.
>
> It was brought to my attention today that the list of archives was
> incomplete so I'll be adding to it and adding another one (developer
> and user). Don't get too attached to the url below, it will be going
> away very soon.
Oh, I see it now. Thanks.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
^ permalink raw reply [nested|flat] 10+ messages in thread
end of thread, other threads:[~2000-10-18 15:24 UTC | newest]
Thread overview: 10+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-10-17 19:02 problem with select where like ']' hubert depesz lubaczewski <depesz@depesz.pl>
2000-10-17 19:33 ` Tom Lane <tgl@sss.pgh.pa.us>
2000-10-17 20:07 ` KuroiNeko <evpopkov@carrier.kiev.ua>
2000-10-17 22:43 ` Joseph Shraibman <jks@selectacast.net>
2000-10-17 23:29 ` Tom Lane <tgl@sss.pgh.pa.us>
2000-10-17 23:43 ` Bruce Momjian <pgman@candle.pha.pa.us>
2000-10-17 23:53 ` Joseph Shraibman <jks@selectacast.net>
2000-10-18 15:24 ` Peter Eisentraut <peter_e@gmx.net>
2000-10-18 00:00 ` Vince Vielhaber <vev@michvhf.com>
2000-10-18 00:05 ` Bruce Momjian <pgman@candle.pha.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