Re: [GENERAL] update in triggers

2005-01-19 Thread Alban Hertroys
Jamie Deppeler wrote: 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"

Re: [GENERAL] update in triggers

2005-01-18 Thread Michael Fuhr
On Tue, Jan 18, 2005 at 11:34:41PM -0600, Mike G. wrote: > Isn't the syntax CREATE OR REPLACE FUNCTION chargeratetest() RETURNS > "trigger" AS' That's the same thing as > > CREATE OR REPLACE FUNCTION "chargeratetest" () RETURNS trigger AS' with different identifiers quoted. See the documenta

Re: [GENERAL] update in triggers

2005-01-18 Thread Michael Fuhr
[Please don't post in HTML.] On Wed, Jan 19, 2005 at 04:45:14PM +1100, Jamie Deppeler wrote: > What i am trying to do is to update a field based on a sql query > set notes='hello' is just being used as a test but i can not seem > to make this simple update work Do you want to modify a column in

Re: [GENERAL] update in triggers

2005-01-18 Thread Jamie Deppeler
What i am trying to do is to update a field based on a sql query set notes='hello' is just being used as a test but i can not seem to make this simple update work Michael Fuhr wrote: On Wed, Jan 19, 2005 at 03:45:53PM +1100, Jamie Deppeler wrote: Think im doing something wrong

Re: [GENERAL] update in triggers

2005-01-18 Thread Mike G.
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

Re: [GENERAL] update in triggers

2005-01-18 Thread Michael Fuhr
On Wed, Jan 19, 2005 at 03:45:53PM +1100, Jamie Deppeler wrote: > 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 recursion, noun. See recursion. > CREATE TR

[GENERAL] update in triggers

2005-01-18 Thread Jamie Deppeler
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 PROCED