Re: quick q re execute & scope of new

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: quick q re execute & scope of new
Дата
Msg-id 551E1396.5040809@aklaver.com
обсуждение исходный текст
Ответ на quick q re execute & scope of new  (Scott Ribe <scott_ribe@elevated-dev.com>)
Ответы Re: quick q re execute & scope of new  (Scott Ribe <scott_ribe@elevated-dev.com>)
Список pgsql-general
On 04/02/2015 08:30 PM, Scott Ribe wrote:
> Easier to give an example than describe the question, any chance of making something like this work?

You doing this in plpgsql trigger function I presume?

>
> execute('insert into ' || tblname || ' values(new.*)');
>

So
http://www.postgresql.org/docs/9.4/interactive/plpgsql-statements.html#PLPGSQL-STATEMENTS-EXECUTING-DYN:

EXECUTE 'insert into ' || quote_ident(tblname) || ' values(' || new.* || ')'

--
Adrian Klaver
adrian.klaver@aklaver.com


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: quick q re execute & scope of new
Следующее
От: Scott Ribe
Дата:
Сообщение: Re: quick q re execute & scope of new