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 8A11753B96 for ; Wed, 4 May 2005 13:26:31 -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 41445-02 for ; Wed, 4 May 2005 16:26:29 +0000 (GMT) Received: from wolff.to (wolff.to [66.93.197.194]) by svr1.postgresql.org (Postfix) with SMTP id 9721F53B49 for ; Wed, 4 May 2005 13:26:27 -0300 (ADT) Received: (qmail 1493 invoked by uid 500); 4 May 2005 16:46:29 -0000 Date: Wed, 4 May 2005 11:46:29 -0500 From: Bruno Wolff III To: Greg Stark Cc: Zlatko Matic , pgsql-general@postgresql.org, pgsql-interfaces@postgresql.org Subject: Re: [INTERFACES] calculated identity field in views, again... Message-ID: <20050504164629.GA30968@wolff.to> Mail-Followup-To: Bruno Wolff III , Greg Stark , Zlatko Matic , pgsql-general@postgresql.org, pgsql-interfaces@postgresql.org References: <877jifwp6r.fsf@stark.xeocode.com> <001801c55087$2828d9a0$c5861dc3@zlatkovyfkpgz6> <20050504141632.GA8763@wolff.to> <87vf5zuh6n.fsf@stark.xeocode.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87vf5zuh6n.fsf@stark.xeocode.com> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.009 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200505/194 X-Sequence-Number: 77542 On Wed, May 04, 2005 at 11:47:12 -0400, Greg Stark wrote: > Bruno Wolff III writes: > > > > How do I create sequence ? > > > > You can't create a sequence for a view. You would need to have it in a > > table that is joined as part of the view. > > Sure you can. You can have any expression you want, including nextval('seq') > in your view. The problem is that every time you query it it will provide > different numbers. I can't see that being useful. That is more or less what I meant. You can't usefully tie a sequence directly to a view, the way you can tie one to a table.