Re: How to escape apostrophes when apostrophes already used to escape something else

Поиск
Список
Период
Сортировка
От Albe Laurenz
Тема Re: How to escape apostrophes when apostrophes already used to escape something else
Дата
Msg-id D960CB61B694CF459DCFB4B0128514C20393814D@exadv11.host.magwien.gv.at
обсуждение исходный текст
Ответ на How to escape apostrophes when apostrophes already used to escape something else  (Stefan Schwarzer <stefan.schwarzer@grid.unep.ch>)
Ответы Re: How to escape apostrophes when apostrophes already used to escape something else  (Grzegorz Jaśkiewicz <gryzman@gmail.com>)
Список pgsql-general
Stefan Schwarzer wrote:
> probably not too complicated, but although googling my way through
> many pages, I don't find the solution.
>
> I have a query which uses already an apostrophe to escape something
> else:
>
> $query = "SELECT
>             *
>         FROM
>             crosstab('SELECT
[...]
>                         (c.name = ''Cote
d'Ivoire'' )
>                     ORDER BY
>                         1,2;', 3) AS ct(name
varchar, y_1960 numeric)
>
> Now, "Cote d'Ivoire" needs to be escaped too. But how can I achieve
> this?

In your case, by using ''Cote d''''Ivoire''.

Yours,
Laurenz Albe

В списке pgsql-general по дате отправления:

Предыдущее
От: Ivan Sergio Borgonovo
Дата:
Сообщение: Re: Query to find list of dates between two dates
Следующее
От: Grzegorz Jaśkiewicz
Дата:
Сообщение: Re: How to escape apostrophes when apostrophes already used to escape something else