X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 20BF93A3C59 for ; Tue, 26 Oct 2004 22:27:24 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 49150-06 for ; Tue, 26 Oct 2004 21:27:12 +0000 (GMT) Received: from smtp.enter.net (smtp.enter.net [216.193.128.24]) by svr1.postgresql.org (Postfix) with ESMTP id CD5D73A3B4B for ; Tue, 26 Oct 2004 22:27:14 +0100 (BST) Received: from localhost (mmail.enter.net [216.193.128.40]) by smtp.enter.net (Postfix) with ESMTP id CFD3BCDC2D; Tue, 26 Oct 2004 17:27:13 -0400 (EDT) Received: from [216.193.128.221] (fahey.enter.net [216.193.128.221]) by smtp.enter.net (Postfix) with ESMTP id 3773ECDC05; Tue, 26 Oct 2004 17:27:13 -0400 (EDT) Message-ID: <417EC0C5.5060904@enter.net> Date: Tue, 26 Oct 2004 17:25:25 -0400 From: Mike Fahey User-Agent: Mozilla Thunderbird 0.7.3 (X11/20041012) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jeff Eckermann Cc: Postgres list Subject: Re: update rules + views + odbc problems References: <20041007210122.90595.qmail@web20828.mail.yahoo.com> In-Reply-To: <20041007210122.90595.qmail@web20828.mail.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checker-Version: Enter.Net Virus Scanner 1.1 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200410/124 X-Sequence-Number: 4599 Hey, here's an update. Adding the column "ctid" to the view ( and recreating the rewrite rule) fixed the problem. Magically I can update the view from access. Without the column "ctid", it seems impossible to update a view. Can the developers implement a fix in the odbc driver or is this something we have to live with? I'm using access2003 SP1 with odbc snapshot 08-00-0001 Thanks! With best regards, Mike Fahey - Systems Administration ******************************************************************** ENTER.NET - "The Road to the Internet Starts Here!" (tm) (610) 437-2221 * http://www.enter.net/ * email:support@enter.net ******************************************************************** Jeff Eckermann wrote: >--- Mike Fahey wrote: > > > >>Hi, i'm runing into problems when I have a view >>defined and then try to >>update the view with a rewrite rule in place. >> >>At a psql prompt I can update the view just fine. >> >> >>I'm using access 2003 and I have a subform bound to >>a view in postgres, >>then I have a rewrite rule defined on the view. >> >>With psqlodbc.dll version 07.03.0200 I get the >>following error in access: >> >>No Current Record. >> >>With psqlodbc.dll version 08.00.0001 I get the >>following error in access: >> >>Write Conflict >> >>This record has been changed by another user since >>you started editing >>it. if you >>save the record you will overwrite the changes the >>other user made. >> >>Copying the changes to the clipboard will let you >>look at the values >>the other user entered, >>and then paste your changes back in if you decide >>to make changes. >> >>Any thoughts? >> >> > >This problem keeps coming around on this list, and I >have never seen a real solution, as in a method to do >what you want. > >What is lacking is the "ctid" column, which is a >system column attached to every table, and which the >ODBC driver uses as a unique row identifier (I am >assuming that you have "row versioning" set to true). >Since the ctid value is supposed to point to the >actual physical location of the disk, it will be >unique across the database. So, in theory, you could >get away with including "ctid" in your view >definition. But this has never been tested, to my >knowledge, and I don't understand the implementation >of either ODBC or PostgreSQL nearly well enough to say >whether that really would work. > >An alternative would be to base the subform on an >equivalent query defined in Access. Though this could >be a performance problem, if the view is filtering a >lot of rows out. > > > >>Thanks in advance. >> >> >> >> >>-- >>With best regards, >> >>Mike Fahey - Systems Administration >> >> >> >******************************************************************** > > >> ENTER.NET - "The Road to the Internet Starts >>Here!" (tm) >> (610) 437-2221 * http://www.enter.net/ * >>email:support@enter.net >> >> >> >******************************************************************** > > >>---------------------------(end of >>broadcast)--------------------------- >>TIP 3: if posting/reading through Usenet, please >>send an appropriate >> subscribe-nomail command to >>majordomo@postgresql.org so that your >> message can get through to the mailing list >>cleanly >> >> >> > > > > >_______________________________ >Do you Yahoo!? >Declare Yourself - Register online to vote today! >http://vote.yahoo.com > >---------------------------(end of broadcast)--------------------------- >TIP 7: don't forget to increase your free space map settings > >