X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id BE7365372D; Wed, 4 May 2005 02:11:35 -0300 (ADT) 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 85115-07; Wed, 4 May 2005 05:11:33 +0000 (GMT) Received: from stark.xeocode.com (stark.xeocode.com [216.58.44.227]) by svr1.postgresql.org (Postfix) with ESMTP id 742C25376F; Wed, 4 May 2005 02:11:32 -0300 (ADT) Received: from localhost ([127.0.0.1] helo=stark.xeocode.com) by stark.xeocode.com with smtp (Exim 3.36 #1 (Debian)) id 1DTCAP-0005Da-00; Wed, 04 May 2005 01:11:25 -0400 To: "Zlatko Matic" Cc: , Subject: Re: [INTERFACES] calculated identity field in views, again... References: <20050503151626.37630.qmail@web52405.mail.yahoo.com> <4277EAEF.5030707@mailblocks.com> <001201c5502c$1c030430$2d8b1dc3@zlatkovyfkpgz6> In-Reply-To: <001201c5502c$1c030430$2d8b1dc3@zlatkovyfkpgz6> From: Greg Stark Organization: The Emacs Conspiracy; member since 1992 Date: 04 May 2005 01:11:24 -0400 Message-ID: <877jifwp6r.fsf@stark.xeocode.com> Lines: 16 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200505/168 X-Sequence-Number: 77516 "Zlatko Matic" writes: > In regular tables, I use bigserial field, but how can I create calculated > bigserial column in a view ? You would have to create a sequence and reference it with nextval('sequencename') in your view. But I doubt very much that it will do anything useful. It sounds like Access wants to be able to update records by looking them up by primary key. In that case assigning a new value in your view will make Postgres make up a brand new number that is utterly useless for finding the record again later. -- greg