From: Florian G. Pflug <fgp@phlo.org>
To: pgsql-general@postgresql.org
Subject: Re: Problem creating trigger-function with arguments (8.0rc4)
Date: Mon, 10 Jan 2005 14:58:24 +0100
Message-ID: <41E28A00.70708@phlo.org> (raw)
In-Reply-To: <20050107204431.GA91345@winnie.fuhr.org>
References: <41DEEA4C.8090903@phlo.org>
<20050107204431.GA91345@winnie.fuhr.org>
Michael Fuhr wrote:
> On Fri, Jan 07, 2005 at 09:00:12PM +0100, Florian G. Pflug wrote:
>>CREATE OR REPLACE FUNCTION functions.t_insert_deny(v_message text)
>>RETURNS "trigger" AS $$
> See the "Trigger Procedures" section of the PL/pgSQL documentation.
> The first paragraph contains this:
>
> Note that the function must be declared with no arguments even if
> it expects to receive arguments specified in CREATE TRIGGER ---
> trigger arguments are passed via TG_ARGV, as described below.
Seems I should have RTFMed more ;-). I believe I even read this
paragraph, but thought this refers to C-Functions, not plpgsql ones.
Thanks for pointing this out.
>>If I replace RETURNS "trigger" with e.g. RETURNS "int8" it works...
>>Is this is a bug, or has something regarding triggerfunctions and
>>parameters changed in 8.0
> Changed since when? Are you saying this worked in an older version
> of PostgreSQL? If so, what version? The paragraph I quoted above
> goes back to at least 7.2.
I didn't test on anything other than 8.0 - but I used the 7.4 docu, not
the 8.0 one, and since the docu says that trigger functions _can_ take
parameters, I somehow believed that it has to be possible to _declare_
those arguments - Well, guess I should read more carefully ;-)
greetings, Florian Pflug
Attachments:
smime.p7s (application/x-pkcs7-signature, 4.0K) download
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: fgp@phlo.org
Subject: Re: Problem creating trigger-function with arguments (8.0rc4)
In-Reply-To: <41E28A00.70708@phlo.org>
References: <41DEEA4C.8090903@phlo.org> <20050107204431.GA91345@winnie.fuhr.org> <41E28A00.70708@phlo.org>
* 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