X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 0CA0B52896 for ; Wed, 1 Jun 2005 12:17:46 -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 73257-06 for ; Wed, 1 Jun 2005 15:17:43 +0000 (GMT) Received: from hotmail.com (bay104-f13.bay104.hotmail.com [65.54.175.23]) by svr1.postgresql.org (Postfix) with ESMTP id A5B7B52887 for ; Wed, 1 Jun 2005 12:17:43 -0300 (ADT) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 1 Jun 2005 08:17:42 -0700 Message-ID: Received: from 65.54.175.204 by by104fd.bay104.hotmail.msn.com with HTTP; Wed, 01 Jun 2005 15:17:41 GMT X-Originating-IP: [65.54.175.204] X-Originating-Email: [dklugmann@hotmail.com] X-Sender: dklugmann@hotmail.com In-Reply-To: <22df564b05060107539603a26@mail.gmail.com> From: "David Klugmann" To: rafacouto@gmail.com Cc: pgsql-sql@postgresql.org Subject: Re: View unique rowid Date: Wed, 01 Jun 2005 15:17:41 +0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-OriginalArrivalTime: 01 Jun 2005 15:17:42.0185 (UTC) FILETIME=[0E216990:01C566BD] X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.312 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST, MSGID_FROM_MTA_HEADER X-Spam-Level: * X-Archive-Number: 200506/6 X-Sequence-Number: 21607 Many thanks I think the problem with using the oid from the primary table is that may rows in the view definition will get the same oid because of the union. Thanks very much anyway. I will look at the temporary sequence although I am not sure if sequences work with views. Regards David >From: Rafa Couto >Reply-To: Rafa Couto >To: David Klugmann >CC: pgsql-sql@postgresql.org >Subject: Re: [SQL] View unique rowid >Date: Wed, 1 Jun 2005 16:53:19 +0200 > > > Is it possible to refer to a unique row identifier on a view ? > > > > I have the following view but in a subsequent select I need to refer to > > each row's unique identifier and I know oid's are not valid for a view. > > >You can get an oid from some table in view definition. May be it >results to resolve your problem... > >You can also try "create temp sequence" (review >http://archives.postgresql.org/pgsql-sql/2005-05/msg00126.php) > > >select 'saludos'; > >-- >Rafa Couto (caligari) >mailto:rafacouto@gmail.com > >---------------------------(end of broadcast)--------------------------- >TIP 4: Don't 'kill -9' the postmaster