Re: Documentation on standard conforming strings?

Поиск
Список
Период
Сортировка
От Albe Laurenz
Тема Re: Documentation on standard conforming strings?
Дата
Msg-id D960CB61B694CF459DCFB4B0128514C203A89824@exadv11.host.magwien.gv.at
обсуждение исходный текст
Ответ на Documentation on standard conforming strings?  (Preston de Guise <preston@anywebdb.com>)
Список pgsql-general
Preston de Guise wrote:
> I don't yet properly understand the conforming strings implementation
> that came in 8.3 The manual (to me at least) has been a little
> imprecise in describing the implications for correctly inserting data
> with this enabled without getting back a plethora of warnings, or
> having the inserts fail completely.
>
> Is anyone aware of a good "how to" document on conforming strings
> covering such topics as:
>
> - Valid quoting methods and when the various ones should be used
> - Criteria for warnings (in some instances it seems you can get
> warnings about them no matter how 'safely' you insert? I.e., I know
> I'm likely to still be doing things wrong...)
> (- Any coverage of DBD::Pg's capabilities would be a great bonus)

I'll try to describe it in a few simple lines:

- with standard_conforming_strings=off, backslashes in string constants
  are always interpreted as escape characters.
- with standard_conforming_strings=on, backslashes in string constants
  are interpreted as escape characters *only* if the string constant is
  preceeded by an E.
- The warnings are only about the first case; they warn you that
  your backslash characters are interpreted as escape characters even
  though the string is not preceeded by E.

I don't think there's anything special to consider for DBD::Pg.

Yours,
Laurenz Albe

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

Предыдущее
От: Scott Ribe
Дата:
Сообщение: Re: numeric field overflow
Следующее
От: Miklosi Attila
Дата:
Сообщение: Re: connection failure