Re: [PROPOSAL] DML value format

Поиск
Список
Период
Сортировка
От Michael Glaesemann
Тема Re: [PROPOSAL] DML value format
Дата
Msg-id 9E224F0B-8CB3-4475-A5EB-EE942235038C@seespotcode.net
обсуждение исходный текст
Ответ на Re: [PROPOSAL] DML value format  (Osvaldo Rosario Kussama <osvaldo_kussama@yahoo.com.br>)
Список pgsql-general
On Aug 13, 2007, at 11:21 , Osvaldo Rosario Kussama wrote:

> Dollar-Quoted String Constants?
> http://www.postgresql.org/docs/8.2/interactive/sql-syntax-
> lexical.html#SQL-SYNTAX-CONSTANTS
>
> INSERT INTO persons VALUES ($$Harry$$, $$O'Callaghan$$);

Do not interpolate values into SQL literals, regardless of which
literal syntax you're using. Use bind parameters.

> Perhaps use quote_literal() function?
> http://www.postgresql.org/docs/8.2/interactive/functions-string.html

If you're writing a database adapter, maybe. Otherwise, use bind
parameters. They're easier and you shouldn't have to worry about
always remembering to use quote_literal.

Michael Glaesemann
grzm seespotcode net



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

Предыдущее
От: Osvaldo Rosario Kussama
Дата:
Сообщение: Re: [PROPOSAL] DML value format
Следующее
От: "Scott Marlowe"
Дата:
Сообщение: Re: Persistent connections in PHP