| From: | Ali Pouya <alipouya2(at)gmail(dot)com> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | Using the NEW record in an EXECUTE command in a PL/pgSQL trigger function |
| Date: | 2013-01-02 12:49:09 |
| Message-ID: | CAEEEPmwOJhxNKxwH2TWogDkp4zADewX3oR-G2Ub1uWOQv6QvFQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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 | Content-Type | Size |
|---|---|---|
| problem.sql | application/octet-stream | 705 bytes |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Pavel Stehule | 2013-01-02 13:27:01 | Re: Using the NEW record in an EXECUTE command in a PL/pgSQL trigger function |
| Previous Message | Marko Tiikkaja | 2013-01-02 01:17:57 | Re: Recovering from an exception |