Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 456FA9F9F47 for ; Mon, 11 Dec 2006 21:34:59 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 30605-07 for ; Mon, 11 Dec 2006 21:34:52 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from web31810.mail.mud.yahoo.com (web31810.mail.mud.yahoo.com [68.142.207.73]) by postgresql.org (Postfix) with SMTP id 537E69F931E for ; Mon, 11 Dec 2006 21:34:52 -0400 (AST) Received: (qmail 97202 invoked by uid 60001); 12 Dec 2006 01:34:50 -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=6RnoZvrFye5mvx5aQMmq3Vbsa0t3O7RDheGxgNPhWc86SwS6S/JBTwF2kYyW0b9TwwIqiQaYwifEMcZKaxQtLK1LVzNq1mzQWba4YGFS64JfF6CxtWA0U6AMn+a0dU8MSDzbI5a+ak53YvP5+FLn62qz6KRX2T1SmL4Y3EGnKik=; X-YMail-OSG: Wnqm8.gVM1n4ycDiyjt1LijSGCDJAplk0hXj20LHPPUkZsI1yGRRk9dsniJpt1ITkpIPF.o8Xmlno6.fWjoLQO1AE81SN7_42DhWzG4we_T2g7OuVKJgt2tbuRtSjDFYq.II5E6owEUb0_xjwiIzF0N68qr4y7Q_0Q-- Received: from [12.177.97.50] by web31810.mail.mud.yahoo.com via HTTP; Mon, 11 Dec 2006 17:34:50 PST Date: Mon, 11 Dec 2006 17:34:50 -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: <457E02D4.7080506@tpf.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <860305.95549.qm@web31810.mail.mud.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.183 tagged_above=0 required=5 tests=AWL, BAYES_20, DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST, DNS_FROM_RFC_WHOIS X-Spam-Level: * X-Archive-Number: 200612/35 X-Sequence-Number: 8482 > Please change the field name of B.ctid from hasbandctid to ctid. > The name should be "ctid" for the driver to detect the field is for versioning. > A.ctid isn't needed. It works now! However, I have a question. If I have a view with more than two joined tables will i need to reference the ctid from each table after the first update statement? Is this even possible since I have to have unique column names? View Definition ----------------------------- CREATE OR REPLACE VIEW public.vhusband (id, ctid, name, tiesize) AS SELECT A.id, B.ctid, A.name, B.tiesize FROM public.person as A INNER JOIN public.husband as B ON A.id = B.ID ; 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.ctid ) ; Successful Log showing commit ----------------------------- BEGIN; UPDATE "public"."vhusband" SET "name"=E'hello44',"tiesize"=52 WHERE "id" = 10 AND "ctid" = E'(0,47)' SELECT "id","ctid","name","tiesize" FROM "public"."vhusband" WHERE "id" = 10 COMMIT :-) Regards, Richard Broersma Jr.