Re: BUG #2228: escaped single quotes choke spi_exec_query in plperlu

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #2228: escaped single quotes choke spi_exec_query in plperlu
Дата
Msg-id 638.1138808309@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #2228: escaped single quotes choke spi_exec_query in plperlu  ("Michael Lush" <michael@galton.ucl.ac.uk>)
Ответы Re: BUG #2228: escaped single quotes choke spi_exec_query in  (michael <michael@galton.ucl.ac.uk>)
Список pgsql-bugs
michael <michael@galton.ucl.ac.uk> writes:
> On Wed, 1 Feb 2006, Tom Lane wrote:
>> It's hardly a bug that you get a syntax error when $data contains
>> a single quote.  It's up to you to construct a well-formed query
>> string to give to spi_exec_query, and this code is not doing that.

> As I understand it the  input strings are correctly escaped

> INSERT INTO test VALUES ('No problem here');
> INSERT INTO test VALUES ('It''s a problem here');
> INSERT INTO test VALUES ('It\'s also a problem here');

Yeah, but by the time your trigger sees it, the data isn't escaped
anymore.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #2229: Parsing error in Functions Grant Wizard
Следующее
От: Clifford Wolf
Дата:
Сообщение: Re: Bug in query planer ?