Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id E84B49FB279 for ; Wed, 11 Oct 2006 13:51:18 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 76505-04 for ; Wed, 11 Oct 2006 16:51:10 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 3F47B9FA220 for ; Wed, 11 Oct 2006 13:51:10 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from outmx010.isp.belgacom.be (outmx010.isp.belgacom.be [195.238.5.233]) by svr4.postgresql.org (Postfix) with ESMTP id 4A2C55AF024 for ; Wed, 11 Oct 2006 16:51:09 +0000 (GMT) Received: from outmx010.isp.belgacom.be (localhost [127.0.0.1]) by outmx010.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-OUT-2.22) with ESMTP id k9BGnXqj022043 for ; Wed, 11 Oct 2006 18:49:33 +0200 (envelope-from ) Received: from [127.0.0.1] (122.107-200-80.adsl-dyn.isp.belgacom.be [80.200.107.122]) by outmx010.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-OUT-2.22) with ESMTP id k9BGnSOn021987; Wed, 11 Oct 2006 18:49:29 +0200 (envelope-from ) Message-ID: <452D209E.80303@freesurf.fr> Date: Wed, 11 Oct 2006 18:49:34 +0200 From: Arnaud Lesauvage Reply-To: thewild@free.fr User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: Tony Caduto Cc: pgsql-odbc@postgresql.org Subject: Re: Access2000 & sequence as primary key in view : #DELETED References: <452CAEC2.5070903@freesurf.fr> <452D0566.9070600@amsoftwaredesign.com> <452D0A85.8000204@freesurf.fr> <452D143A.7010300@amsoftwaredesign.com> In-Reply-To: <452D143A.7010300@amsoftwaredesign.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Antivirus: avast! (VPS 0641-2, 10/10/2006), Outbound message X-Antivirus-Status: Clean X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200610/25 X-Sequence-Number: 8288 Tony Caduto a écrit : > That's not the problem, a sequence is just a integer generator for a > integer field/column that has a nextval function in the columns default > value. > The view and the table don't know anything about the sequence other than > the reference to it in the columns default value. > Sequences are completely independent of any view or table and a serial > type is not a real type since it simply places a nextval function call > in the columns default value(and some entries in the pg_depend table). The fact is that we are talking about ODBC here. The difference between a table and a view is that in the table one record as one value of the sequence, forever. With a linked view in access, if I sort the table or query it in anyway new sequence numbers are given to all the fields. > Here is a example table that at one time always got the # deleted in > Access 97, then we modified it like so: > ... > > we simply added a record id field to every table and made that the PK, > then to enforce the constraints we had before in the PK we created a > unique index. > > We have not had a problem with the # deleted entries showing up since we > did this to all the tables in Postgresql. > > When using ODBC ACCESS does use the PK in the PG tables and it only > works with a single integer value. Maybe newer versions of Access > behave differently with ODBC linked tables but I kind of doubt it. I know about all these problems with Access, and all my tables are configured in such a way that the #DELETED problem never arises. The problem is with this view. (sorry to insist, but it really does matter here that the linked table is a view)