Doubt on opaque returntype!!
От | Thirumoorthy Bhuvneswari |
---|---|
Тема | Doubt on opaque returntype!! |
Дата | |
Msg-id | 20020918110151.73287.qmail@web13607.mail.yahoo.com обсуждение исходный текст |
Ответы |
Re: Doubt on opaque returntype!!
Re: Doubt on opaque returntype!! |
Список | 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 по дате отправления: