From: | "Dale Harris" <itsupport(at)jonkers(dot)com(dot)au> |
---|---|
To: | "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Triggers not working |
Date: | 2008-09-23 01:26:13 |
Message-ID: | 00b101c91d1b$62cdb260$28691720$@com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi Tom,
The trigger trAccountUpdate got called, but why didn't the trigger
trEntityUpdate get called?
Regards,
Dale Harris.
-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: Monday, 22 September 2008 22:22
To: Dale Harris
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Triggers not working
"Dale Harris" <itsupport(at)jonkers(dot)com(dot)au> writes:
> I'm running PostgreSQL 8.3.3 and I'm having trouble with triggers not
always
> working. I have the following tables and functions as documented below.
My
> problem is that if I perform an update on the Entity table and modify the
> Code field, why doesn't the trigger for the Entity table execute? (Row
was
> initially added via the Account table.)
Worksforme ...
regression=# insert into "Account" values(1,'code','name');
INSERT 0 1
regression=# select * from "Entity";
ID | Code | Name | Modified | ModifiedBy
----+------+------+---------------------------+------------
1 | code | name | 2008-09-22 08:19:51.70-04 | postgres
(1 row)
regression=# update "Entity" set "Code" = 'foo' where "ID" = 1;
NOTICE: trAccountUpdate being called for UPDATE of Account.
UPDATE 1
regression=# select * from "Entity";
ID | Code | Name | Modified | ModifiedBy
----+------+------+---------------------------+------------
1 | foo | name | 2008-09-22 08:20:18.10-04 | postgres
(1 row)
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Yi Zhao | 2008-09-23 01:53:14 | Re: how to return the first record from the sorted records which may have duplicated value. |
Previous Message | Phoenix Kiula | 2008-09-23 00:26:15 | Re: match an IP address |