From: | "Tim Robinson" <tim(dot)robinson(at)blueyonder(dot)co(dot)uk> |
---|---|
To: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Help please - completely baffled by quoting |
Date: | 2004-06-20 12:40:54 |
Message-ID: | 006101c456c3$d4932100$0200a8c0@bart |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi,
I generally consider myself competent with the complexities of quoting but I
can't figure out postgres at all. I've read the manual and it looks very
straightforward but that doesn't accord with my experiences. Here's an
example:
create table temp (a varchar(50));
insert into temp values 'a\'b';
insert into temp values 'a\\b';
insert into temp values 'a\\\'b';
select * from temp returns
a'b
a\b
a\'b
so far so good but what about this:
select * from temp where a like 'a\\\'%'
this should return all strings starting with a\' but it returns nothing!!!
I would expect that these two
select * from temp where a like 'a\\\'b'
select * from temp where a = 'a\\\'b'
should return the same thing. The second one works as expected, but the
first one doesn't return anything.
I'm sure I'm missing something obvious. Thanks in advance for any help.
--- Tim
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2004-06-20 13:06:38 | Re: Help please - completely baffled by quoting |
Previous Message | NTPT | 2004-06-20 12:12:18 | Relocation error pg_dumpall undefined symbol get_progname in 7.4.3 |