Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 541909F9858 for ; Wed, 11 Oct 2006 23:28:09 -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 99555-09 for ; Thu, 12 Oct 2006 02:28:03 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34]) by postgresql.org (Postfix) with SMTP id 50BBB9F976E for ; Wed, 11 Oct 2006 23:28:02 -0300 (ADT) Received: (qmail 20841 invoked from network); 12 Oct 2006 11:27:59 +0900 Received: from unknown (HELO ?100.0.32.170?) (100.0.32.170) by sd2.tpf-fw-c.co.jp with SMTP; 12 Oct 2006 11:27:59 +0900 Message-ID: <452DA82D.9000701@tpf.co.jp> Date: Thu, 12 Oct 2006 11:27:57 +0900 From: Hiroshi Inoue User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: Arnaud Lesauvage CC: pgsql-odbc@postgresql.org Subject: Re: Access2000 & sequence as primary key in view : #DELETED References: <452CAEC2.5070903@freesurf.fr> In-Reply-To: <452CAEC2.5070903@freesurf.fr> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=2.43 tagged_above=0 required=5 tests=RCVD_IN_WHOIS_BOGONS X-Spam-Level: ** X-Archive-Number: 200610/30 X-Sequence-Number: 8293 Arnaud Lesauvage wrote: > Hi list ! > > I created a view in postgresql (quite complex, multiple tables are > linked). The aim is to link it in acces via ODBC. > > In needed to auto-number the rows, and I created a sequence for that > (thanks to a good advice on the GENERAL list). > > In Access, I know that I need good primary keys on my linked tables > (integer, single column). I though that using this column as a primary > key would be a good idea . > > The view looks like this : > CREATE OR REPLACE VIEW my_view AS > SELECT nextval('my_view_seq'::regclass)::integer AS "index", other fields> FROM ; Though I don't understand the problem wholly, the virtual column "index" doesn't seem appropriate for the identifier. How do you find the row using the "index" ? regards, Hiroshi Inoue