From: w fm3 <wfm3@hotmail.com>
To: pgsql-odbc@postgresql.org
Subject: Update rule on view with multiple tables fails?
Date: Sat, 25 Oct 2003 18:39:52 +0000
Message-ID: <BAY1-F132LbcfmINlCn00009b32@hotmail.com> (raw)
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. - But seems to work with
php though?
--
Postgresql 7.3.2
odbc up to and incl ver7.03.0201
1 view, joining 2 tables
(1 - many in this case- companies 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:
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
_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: wfm3@hotmail.com
Subject: Re: Update rule on view with multiple tables fails?
In-Reply-To: <BAY1-F132LbcfmINlCn00009b32@hotmail.com>
References: <BAY1-F132LbcfmINlCn00009b32@hotmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox