Re: how to escape _ in select
От | Dmitriy Igrishin |
---|---|
Тема | Re: how to escape _ in select |
Дата | |
Msg-id | AANLkTi=MiHWF3tZK0sPJc=sgnzBupnziPjCyaCYApGyo@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: how to escape _ in select (Wes James <comptekki@gmail.com>) |
Список | pgsql-sql |
Hey James,
Because in future releases the default value of the "standard_conforming_strings"
parameter will change to "on" for improved standards compliance.
You should use string constants with C-Style escapes.
Please, see
http://www.postgresql.org/docs/8.4/static/sql-syntax-lexical.html#SQL-SYNTAX-CONSTANTS
for details.
Regards,
Dmitriy
Because in future releases the default value of the "standard_conforming_strings"
parameter will change to "on" for improved standards compliance.
You should use string constants with C-Style escapes.
Please, see
http://www.postgresql.org/docs/8.4/static/sql-syntax-lexical.html#SQL-SYNTAX-CONSTANTS
for details.
Regards,
Dmitriy
2010/7/29 Wes James <comptekki@gmail.com>
On Wed, Jul 28, 2010 at 12:15 PM, Little, Douglas
<DOUGLAS.LITTLE@orbitz.com> wrote:
> Wes.
>
> You probably missed the part in bold. You need to double the backslash.
>
> select 'ab5c' like '%\_c'
>
> t
>
Why doesn't this work?
select * from table where field::text ilike '%\\\%'
WARNING: nonstandard use of \\ in a string literal
-wes
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
В списке pgsql-sql по дате отправления: