pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: hubert depesz lubaczewski <depesz@depesz.pl>
To: PGSQL-SQL <pgsql-sql@postgresql.org>
Subject: problem with select where like ']'
Date: Tue, 17 Oct 2000 21:02:51 +0200
Message-ID: <20001017210251.A4327@cyber.cs.net.pl> (raw)

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 ...



view thread (10+ messages)  latest in thread

Message-ID: <20001017210251.A4327@cyber.cs.net.pl>
Permalink:  ../20001017210251.A4327@cyber.cs.net.pl/
Also on:    postgresql.org/message-id/20001017210251.A4327@cyber.cs.net.pl

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: depesz@depesz.pl
  Subject: Re: problem with select where like ']'
  In-Reply-To: <20001017210251.A4327@cyber.cs.net.pl>
  References: <20001017210251.A4327@cyber.cs.net.pl>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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