Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




2013/1/2 Pavel Stehule <pavel.stehule@xxxxxxxxx>
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;




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux