Help please - completely baffled by quoting
| От | Tim Robinson |
|---|---|
| Тема | Help please - completely baffled by quoting |
| Дата | |
| Msg-id | 006101c456c3$d4932100$0200a8c0@bart обсуждение исходный текст |
| Ответы |
Re: Help please - completely baffled by quoting
|
| Список | 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
В списке pgsql-general по дате отправления: