Re: vacuumlo nonstandard use of \\ in a string literal

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: vacuumlo nonstandard use of \\ in a string literal
Дата
Msg-id
23179.1140714534@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
vacuumlo nonstandard use of \\ in a string literal Michael Fuhr <mike@fuhr.org>
Re: vacuumlo nonstandard use of \\ in a string literal Tom Lane <tgl@sss.pgh.pa.us>
Michael Fuhr  writes:
> How backward compatible should vacuumlo remain?  This patch changes
> the string to E'...' but other ways would be to use dollar quotes
> or ESCAPE.

In this particular case, a far better answer is to replace

> ! 	strcat(buf, "      AND s.nspname NOT LIKE 'pg\\\\_%'");

with

> ! 	strcat(buf, "      AND s.nspname !~ '^pg_'");

which sidesteps the problem entirely and is more readable to boot.

			regards, tom lane
В списке pgsql-patches по дате отправления
От: Michael Fuhr
Дата:
От: Andrew Dunstan
Дата:
Сообщение: fix initdb -U
FAQ