From: Tom Lane <tgl@sss.pgh.pa.us>
To: Torsten Zühlsdorff <foo@meisterderspiele.de>
Cc: pgsql-sql@postgresql.org
Subject: Re: [Trigger] Help needed with NEW.* and TG_TABLE_NAME
Date: Tue, 11 May 2010 10:23:30 -0400
Message-ID: <6038.1273587810@sss.pgh.pa.us> (raw)
In-Reply-To: <hsbiuo$rbe$1@news.eternal-september.org>
References: <hsbiuo$rbe$1@news.eternal-september.org>
=?ISO-8859-15?Q?Torsten_Z=FChlsdorff?= <foo@meisterderspiele.de> writes:
> NEW.revision := addContentRevision (OLD.content_id, OLD.revision);
> /* not working line, just a stub:
> EXECUTE 'INSERT INTO ' || TG_TABLE_NAME || ' SELECT $1 ' USING NEW;
> */
> RETURN NULL;
This seems like the hard way. Why don't you just RETURN NEW and let the
normal insertion happen?
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, foo@meisterderspiele.de
Subject: Re: [Trigger] Help needed with NEW.* and TG_TABLE_NAME
In-Reply-To: <6038.1273587810@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox