Doubt on opaque returntype!! - Mailing list pgsql-general

From Thirumoorthy Bhuvneswari
Subject Doubt on opaque returntype!!
Date
Msg-id 20020918110151.73287.qmail@web13607.mail.yahoo.com
Whole thread Raw
Responses Re: Doubt on opaque returntype!!  (Oliver Elphick <olly@lfix.co.uk>)
Re: Doubt on opaque returntype!!  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List pgsql-general
hi,
I am using postgresql-7.0 with RedHat Linux-7.1. I am
having two tables:tableA and tableB. On every insert
in tableA there should be an update in tableB.
I created a function like the following:
CREATE FUNCTION test_trigger() RETURNS opaque As '
DECLARE
v_sno INT:=0;
BEGIN
FOR C1 IN select sno from tableB LOOP
v_sno:=v_sno+c1.sno;
update tableB set sno=v_sno;
END LOOP;
RETURN opaque;
END;
'LANGUAGE 'plpgsql';

This function is created. After that I created a
trigger as the following:
createm trigger test_trigger_1 after insert on tableA
for each row execute procedure test_trigger();

This trigger is also created. But, when I try to
insert into the tableA it comes with the error:

'ERROR during compile of test_trigger near line 8
ERROR:return type mismatch in function returning table
row at or near "opaque"

I don't know where I am wrong. please help me.
thanks.
bhuvaneswari.t


__________________________________________________
Do you Yahoo!?
Yahoo! News - Today's headlines
http://news.yahoo.com

pgsql-general by date:

Previous
From: Wim
Date:
Subject: Re: [ADMIN] Still big problems with pg_dump!
Next
From: Oliver Elphick
Date:
Subject: Re: Doubt on opaque returntype!!