Re: Backslashitis
От
Raghavendra
Тема
Re: Backslashitis
Дата
Msg-id
CA+h6AhjK6TpRwh17r19xKZGW7+cTe8+iikxQYSTp_7R_KRcQFg@mail.gmail.com
Ответ на
Re: Backslashitis (Dean Rasheed)
Список
Дерево обсуждения
Backslashitis hamann.w@t-online.de
Re: Backslashitis Raghavendra <raghavendra.rao@enterprisedb.com>
Re: Backslashitis Thomas Kellerer <spam_eater@gmx.net>
Re: Backslashitis Raghavendra <raghavendra.rao@enterprisedb.com>
Re: Backslashitis Dean Rasheed <dean.a.rasheed@gmail.com>
Re: Backslashitis Raghavendra <raghavendra.rao@enterprisedb.com>
With standard conforming strings on, you could use any of the following:
update foo set a= E'{"blah \\\\here"}';
update foo set a= '{"blah \\here"}';
update foo set a= ARRAY[E'blah \\here'];
update foo set a= ARRAY['blah \here'];
I tend to prefer the ARRAY[...] constructor syntax because it doesn't
require any additional escaping of individual elements.
http://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-STRINGS-ESCAPE
http://www.postgresql.org/docs/current/static/sql-expressions.html#SQL-SYNTAX-ARRAY-CONSTRUCTORS
Regards,
Dean
Thanks
В списке pgsql-general по дате отправления
От: Evan D. Hoffman
Дата: