Re: Escape handling in strings

Поиск
Список
Период
Сортировка
От Christopher Kings-Lynne
Тема Re: Escape handling in strings
Дата
Msg-id 42B0EFD2.9050805@familyhealth.com.au
обсуждение исходный текст
Ответ на Re: Escape handling in strings  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: Escape handling in strings  (Pavel Stehule <stehule@kix.fsv.cvut.cz>)
Re: Escape handling in strings  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-patches
>     * Allow backslash handling in quoted strings to be disabled for
>       portability
>
>       The use of C-style backslashes (.e.g. \n, \r) in quoted strings is not
>       SQL-spec compliant, so allow such handling to be disabled.  However,
>       disabling backslashes could break many third-party applications and
>       tools.
>
> Now, if we don't address it, we might as well remove the TODO item and
> say we are never going to change it, because right now, we have a plan,
> and I think the longer we go the harder it will be.  And if we don't
> change it, it makes it quite hard for people to port applications to
> PostgreSQL.   Fundamental queries like:
>
>     SELECT * FROM files WHERE filename = 'C:\tmp'
>
> do not work.  When a query with a single table and single WHERE clause
> isn't portable, it seems like a problem.  If this was isolated to CREATE
> TABLE or something, it wouldn't be a big deal.

Why not compromise?  Allow ONLY \' in normal strings?  That'd deal with
the majority of compatibility issues.  Or, like you say, make it a GUC :(

Chris


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Escape handling in strings
Следующее
От: Rod Taylor
Дата:
Сообщение: Re: Escape handling in strings