From: | "w fm3" <wfm3(at)hotmail(dot)com> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | Update rule on multiple tables fails? |
Date: | 2003-10-22 21:55:47 |
Message-ID: | BAY1-F1703Z4d5htAyD000014b8@hotmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Hi
Could anyone let me know if I have done something wrong with the rule? As
when trying to update via ODBC the update fails.
Postgresql 7.3.2
1 view, joining 2 tables
(1 - many, in this case- organisations and contacts- 'orgref' and 'conref'
being the Primary keys)
--
View definition looks like:
SELECT contacts.conref, contacts.orgref, contacts.lastname,
organisations.lob
FROM (contacts
LEFT JOIN organisations ON ((contacts.orgref = organisations.orgref )));
Rule looks like:..do instead...
UPDATE contacts SET lastname = new.lastname
WHERE (old.conref = contacts.conref ); UPDATE organisations SET lob =
new.lob
WHERE (old.orgref = organisations.orgref ); );
---
in this case trying to make changes to the lastname and lob fields.
Many thanks
_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8.
http://join.msn.com/?page=features/junkmail
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2003-10-22 22:01:57 | Re: Expressional Indexes |
Previous Message | Bruce Momjian | 2003-10-22 20:37:02 | Re: Expressional Indexes |