Doubt on opaque returntype!!

From: Thirumoorthy Bhuvneswari <tbhuvneswari(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Doubt on opaque returntype!!
Date: 2002-09-18 11:01:51
Message-ID: 20020918110151.73287.qmail@web13607.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Oliver Elphick 2002-09-18 12:32:57 Re: Doubt on opaque returntype!!
Previous Message Wim 2002-09-18 08:36:53 Re: [GENERAL] Still big problems with pg_dump!