Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id F02039FA19B for ; Mon, 11 Dec 2006 21:07:27 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 21532-07 for ; Mon, 11 Dec 2006 21:07:17 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from web31814.mail.mud.yahoo.com (web31814.mail.mud.yahoo.com [68.142.206.167]) by postgresql.org (Postfix) with SMTP id AF9F59F9F47 for ; Mon, 11 Dec 2006 21:07:22 -0400 (AST) Received: (qmail 54442 invoked by uid 60001); 12 Dec 2006 01:07:21 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=rZ1ndngqaIqNbIf9eSGCAIoVksnkdz9mXmeepXXJRgo6l63gUvDOsSolxR/xU45Ighdh2whe58iO81QEslGB9SJHJU9C5T8g9MCn9Zodqz91D83uX20lsOxWhuoEIOvbEmuaESkIMMX5aHREwhcE2rZcoopFNSuNevmulYlROsI=; X-YMail-OSG: R2Mi_mgVM1l0XT_e3iqMKi.szl7HhqC62FvnohMzug4V6rrk_Km91U4kdnmkqvtkZg-- Received: from [12.177.97.50] by web31814.mail.mud.yahoo.com via HTTP; Mon, 11 Dec 2006 17:07:20 PST Date: Mon, 11 Dec 2006 17:07:20 -0800 (PST) From: Richard Broersma Jr Subject: Re: Update-able View linked to Access To: Hiroshi Inoue Cc: pgsql-odbc@postgresql.org In-Reply-To: <457DF8DD.6010908@tpf.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <938243.53161.qm@web31814.mail.mud.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.997 tagged_above=0 required=5 tests=AWL, BAYES_05, DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST, DNS_FROM_RFC_WHOIS, UPPERCASE_25_50 X-Spam-Level: X-Archive-Number: 200612/33 X-Sequence-Number: 8480 > Could you try the following ? > Add the CTID field of the target table of the last update rule to the > definition of the view. In your case, try to add husband.ctid to the > definition of vhusband. I am still getting similar errors, only now both columns are locked. Here is my new view definition: -------------------------------- CREATE OR REPLACE VIEW public.vhusband (id, personctid, husbandctid, name, tiesize) AS SELECT A.id, A.ctid, B.ctid, A.name, B.tiesize FROM public.person as A INNER JOIN public.husband as B ON A.id = B.ID ; using OLD.husbandctid ------------------------------------ BEGIN;UPDATE "public"."vhusband" SET "tiesize"=3 WHERE "id" = 14 AND "personctid" = E'(0,63)' AND "husbandctid" = E'(0,42)' AND "name" = E'hel0' AND "tiesize" = 3 ROLLBACK ------------------------------------ Here is my new update rule: CREATE OR REPLACE RULE vhusband_update_person AS ON UPDATE TO public.vhusband DO INSTEAD ( UPDATE public.person SET name = NEW.name WHERE id = OLD.id; UPDATE public.husband SET tiesize = NEW.tiesize WHERE id = OLD.id AND ctid = OLD.husbandctid ) ; using NEW.husbandctid --------------------------- BEGIN; UPDATE "public"."vhusband" SET "name"=E'4' WHERE "id" = 14 AND "personctid" = E'(0,63)' AND "husbandctid" = E'(0,42)' AND "name" = E'hel0' AND "tiesize" = 3 ROLLBACK ---------------------------- CREATE OR REPLACE RULE vhusband_update_person AS ON UPDATE TO public.vhusband DO INSTEAD ( UPDATE public.person SET name = NEW.name WHERE id = OLD.id; UPDATE public.husband SET tiesize = NEW.tiesize WHERE id = OLD.id AND ctid = new.husbandctid ) ; Thanks for the help. Regards, Richard Broersma Jr.