Re: update in triggers

From: "Mike G(dot)" <mike(at)thegodshalls(dot)com>
To: Jamie Deppeler <jamie(at)doitonce(dot)net(dot)au>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: update in triggers
Date: 2005-01-19 05:34:41
Message-ID: 20050119053441.GA29575@thegodshalls.thegodshalls
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Isn't the syntax CREATE OR REPLACE FUNCTION chargeratetest() RETURNS "trigger" AS'

?

On Wed, Jan 19, 2005 at 03:45:53PM +1100, Jamie Deppeler wrote:
> Hi,
>
> Think im doing something wrong here, cant seem to resolve the problem i
> have a trigger which is calling a update function and when it gets to a
> update it goes into a infinite loop
>
> code
>
> Trigger
> CREATE TRIGGER "new_trigger" AFTER INSERT OR UPDATE
> ON "chargeratetest" FOR EACH ROW
> EXECUTE PROCEDURE "chargeratetest"();
>
>
> function
>
> CREATE OR REPLACE FUNCTION "chargeratetest" () RETURNS trigger AS'
> begin
>
> UPDATE chargeratetest
> set notes=''hello''
> where new."primary" = chargeratetest."primary";
>
> return null;
> end;
> 'LANGUAGE 'plpgsql' IMMUTABLE CALLED ON NULL INPUT SECURITY INVOKER;
>
>
> would be greatful for any help thx
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jamie Deppeler 2005-01-19 05:45:14 Re: update in triggers
Previous Message Michael Fuhr 2005-01-19 05:31:54 Re: update in triggers