From: | "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk> |
---|---|
To: | "joepie Platteau" <joepie(dot)Platteau(at)kulak(dot)ac(dot)be>, <pgadmin-support(at)postgresql(dot)org> |
Subject: | Re: Trigger problem... |
Date: | 2002-12-17 14:29:26 |
Message-ID: | 03AF4E498C591348A42FC93DEA9661B8128D86@mail.vale-housing.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-support |
Please try the latest pgAdmin (1.4.12) from http://www.pgadmin.org/.
Regards, Dave.
-----Original Message-----
From: joepie Platteau [mailto:joepie(dot)Platteau(at)kulak(dot)ac(dot)be]
Sent: 17 December 2002 14:10
To: pgadmin-support(at)postgresql(dot)org
Subject: [pgadmin-support] Trigger problem...
Hi,
I hope that you could help we with my problem. I already posted
it on the mailing lists, but nobody answered it to the point.
I have the following problem :
I have 2 tables : T-Alumni and T-AlumniB (exact copy of Alumni,
except 3 extra columns : user, date, time)
On events 'update' and 'delete' in table Alumni, I want to copy
the old row to AlumniB (as a backuptable) and add the username, date and
time.
So I created a function :
CREATE FUNCTION trigfunc_add_alumni() RETURNS opaque AS '
begin
insert into T-Alumni-B values (old.Id_Person,
old.Member, old.Payed, old.Nr, old.Alumninr, old.Acyear, old.Styear);
return NULL;
end;
' LANGUAGE 'plpgsql';
Then I wanted to create a trigger using this function with the
properties :
Table T-Alumni
Executes AFTER
Event UPDATE, DELETE
For each ROW
Function trigfunc_add_alumni()
Then I get the error (This error I always get when I want to
create a trigger based on a function (also with predefined functions) :
An error has occurred in pgAfdmin II:frmTrigger.cmdOK_Click :
Number 5
Description : Invalid procedure call or argument
Can you tell me what i'm doing wrong? Or is there another and
better solution for this problem?!
Thanks!!
P.S.S. I have versions
Pgadmin : 1.3.82-Dev
Postgresql : 7.2.1
ODBC-driver : 7.2.4
Joepie Platteau.
From | Date | Subject | |
---|---|---|---|
Next Message | Donald Fraser | 2002-12-17 16:53:52 | The bugs are getting harder to find... |
Previous Message | joepie Platteau | 2002-12-17 14:09:35 | Trigger problem... |