Using the NEW record in an EXECUTE command in a PL/pgSQL trigger function - Mailing list pgsql-general

From Ali Pouya
Subject Using the NEW record in an EXECUTE command in a PL/pgSQL trigger function
Date
Msg-id CAEEEPmwOJhxNKxwH2TWogDkp4zADewX3oR-G2Ub1uWOQv6QvFQ@mail.gmail.com
Whole thread Raw
Responses Re: Using the NEW record in an EXECUTE command in a PL/pgSQL trigger function  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-general
Hi all,

The SQL file joined here reproduces the simplified version of a problem that I encounter when trying to use the "NEW" record in an EXECUTE command within a PL/PgSql trigger function.

In this script the commented INSERT command works fine but the EXECUTE commande returns the following error message :

ERROR:  missing FROM-clause entry for table "new"

I also tried other versions, some of them with the USING clause without success.

My aim is to write a generic trigger function ignoring the column names and types of the triggering table for partitionning purposes.

Can somebody help me ?
Thanks a lot
Best Regards
Ali

Attachment

pgsql-general by date:

Previous
From: "Marko Tiikkaja"
Date:
Subject: Re: Recovering from an exception
Next
From: Pavel Stehule
Date:
Subject: Re: Using the NEW record in an EXECUTE command in a PL/pgSQL trigger function