Re: [GENERAL] Triggers and sql functions not working... - Mailing list pgsql-general

From tolik@icomm.ru (Anatoly K. Lasareff)
Subject Re: [GENERAL] Triggers and sql functions not working...
Date
Msg-id 87u2y6cc74.fsf@tolikus.hq.aaanet.ru
Whole thread Raw
In response to Triggers and sql functions not working...  (Greg Youngblood <YoungblG@houstoncellular.com>)
List pgsql-general
>>>>> "GY" == Greg Youngblood <YoungblG@houstoncellular.com> writes:

. . .

 GY> create function update_tab2 () returns int4 as 'insert into tab2 (l,a,g)
 GY> select distinct a.l,b.a,b.c from tab2 a,tab1 b where b.a not in (select
 GY> distinct a from tab2); select 1 as exitvalue;' language 'sql';

. . .

 GY> create trigger new_tab1_a after insert on tab1 for each row execute
 GY> procedure update_tab2 ();

 GY> generates:

 GY> ERROR:  CreateTrigger: function update_tab2 () does not exist.

Function for triggers must have signature 'xxx() returns opaque', but
not '... returns int'. Pehaps this is your mistake?

--
Anatoly K. Lasareff              Email:       tolik@icomm.ru
Senior programmer

pgsql-general by date:

Previous
From: Anand Surelia
Date:
Subject: Regression test failing on Sparc Solaris 2.5.1
Next
From: Holger Klawitter
Date:
Subject: String Concatenation does not work.