From: Terry Lee Tucker <terry@esc1.com>
To: Postgre General <pgsql-general@postgresql.org>
Subject: Re: Error Message
Date: Wed, 26 Oct 2005 19:45:19 -0400
Message-ID: <200510261945.19824.terry@esc1.com> (raw)
In-Reply-To: <041401c5da84$7429ec90$ac1d4318@OWNER>
References: <03a301c5da6e$a20b6280$ac1d4318@OWNER>
<11706.1130361821@sss.pgh.pa.us>
<041401c5da84$7429ec90$ac1d4318@OWNER>
Bob,
You cannot pass argments to trigger functions. You can to other types of
functions, but not functions used as triggers. Arguments are passed regarding
the old and new records and other built in variables regarding what kind of
operation is going on, but all of that is "unseen".
They must be created as in:
CREATE TRIGGER trig1 AFTER INSERT
ON process FOR EACH ROW
EXECUTE PROCEDURE base();
^^^^^^
Note: no argument.
On Wednesday 26 October 2005 07:24 pm, Bob Pawley saith:
> I'm not sure what you mean.
>
> base(int4) is the name of the function that I want to call. It follows the
> format of an example in a Postgresql book I use (or perhaps misuse).
>
> Are you saying that I need to redo the function???
>
> Bob
> ----- Original Message -----
> From: "Tom Lane" <tgl@sss.pgh.pa.us>
> To: "Bob Pawley" <rjpawley@shaw.ca>
> Cc: "Postgre General" <pgsql-general@postgresql.org>
> Sent: Wednesday, October 26, 2005 2:23 PM
> Subject: Re: [GENERAL] Error Message
>
> > Bob Pawley <rjpawley@shaw.ca> writes:
> >> The function name is listed under Functions as - base(int4)
> >
> > Trigger functions cannot take any explicit parameters.
> >
> > regards, tom lane
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 5: don't forget to increase your free space map settings
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
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: terry@esc1.com
Subject: Re: Error Message
In-Reply-To: <200510261945.19824.terry@esc1.com>
References: <03a301c5da6e$a20b6280$ac1d4318@OWNER> <11706.1130361821@sss.pgh.pa.us> <041401c5da84$7429ec90$ac1d4318@OWNER> <200510261945.19824.terry@esc1.com>
* 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