Re: Using the NEW record in an EXECUTE command in a PL/pgSQL trigger function

Поиск
Список
Период
Сортировка
От Ali Pouya
Тема Re: Using the NEW record in an EXECUTE command in a PL/pgSQL trigger function
Дата
Msg-id CAEEEPmxMSgijhG+CdY=hFUZQqZb21697kq9f5dKmAObOAmZLEQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Using the NEW record in an EXECUTE command in a PL/pgSQL trigger function  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-general

2013/1/2 Pavel Stehule <pavel.stehule@gmail.com>
you forgot USING clause

BEGIN
        EXECUTE 'INSERT INTO measurement1 values(new.*)' USING new;
--        INSERT INTO measurement1 values(new.*);
        RETURN NULL;
END;

Regards

Pavel Stehule

 Hi Pavel,
Thanks for your answer, but it did not work for me (I test on versions 9.1.6 and 9.2.1).

Fortunately I found this solution in the archives :

EXECUTE 'INSERT INTO measurement1 select $1.* ' USING new;



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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: Using the NEW record in an EXECUTE command in a PL/pgSQL trigger function
Следующее
От: Carlos Mennens
Дата:
Сообщение: Dedicated PostgreSQL System