Re: syntax error during function call

Поиск
Список
Период
Сортировка
От Sam Mason
Тема Re: syntax error during function call
Дата
Msg-id 20100127170721.GY5407@samason.me.uk
обсуждение исходный текст
Ответ на syntax error during function call  ("Aycock, Jeff R." <JEFF.R.AYCOCK@saic.com>)
Список pgsql-general
On Wed, Jan 27, 2010 at 10:40:17AM -0500, Aycock, Jeff R. wrote:
> EXECUTE 'SELECT *, $1, now() INTO schema_1.'||whoami||' FROM schema_2.'||whoami||' where created_dt between $2 and
$3;'

You'll also need to expand those other parameters.  The code is executed
in an independent scope and hence PG doesn't know what $1, $2 or $3 are.

The builtin function "quote_literal" is probably best to use here,
especially for the TEXT type.

--
  Sam  http://samason.me.uk/

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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: syntax error during function call
Следующее
От: "Aycock, Jeff R."
Дата:
Сообщение: Re: syntax error during function call