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 6746D3A4BE7 for ; Fri, 21 Jan 2005 17:09:54 +0000 (GMT) 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 55430-10 for ; Fri, 21 Jan 2005 17:09:39 +0000 (GMT) Received: from www.postgresql.com (unknown [200.46.204.209]) by svr1.postgresql.org (Postfix) with ESMTP id C52883A4BF1 for ; Fri, 21 Jan 2005 17:09:28 +0000 (GMT) Received: from anchor-post-35.mail.demon.net (anchor-post-35.mail.demon.net [194.217.242.85]) by www.postgresql.com (Postfix) with ESMTP id 8B8AD7388F1 for ; Fri, 21 Jan 2005 17:09:27 +0000 (GMT) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-35.mail.demon.net with esmtp (Exim 4.42) id 1Cs2Ba-000Bjk-HH; Fri, 21 Jan 2005 17:03:03 +0000 Received: from [192.168.1.17] (client17.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id C8CB617F0F; Fri, 21 Jan 2005 17:04:21 +0000 (GMT) Message-ID: <41F13614.8080101@archonet.com> Date: Fri, 21 Jan 2005 17:04:20 +0000 From: Richard Huxton User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Mihail Nasedkin Cc: pgsql-sql@postgresql.org Subject: Re: OID's References: <3628044953.20050120154558@mail.ru> <20050120164830.GB41081@winnie.fuhr.org> <8411982406.20050121111734@mail.ru> In-Reply-To: <8411982406.20050121111734@mail.ru> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.073 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200501/191 X-Sequence-Number: 19979 Mihail Nasedkin wrote: > Hello, Michael. > > Thank you for answer January, 20 2005, 21:48:30: > > MF> On Thu, Jan 20, 2005 at 03:45:58PM +0500, Mihail Nasedkin wrote: > > >>>How (where) I can get all OID's of the PostgeSQL >>>installation? >>>In other words where OID's is stored? Is it stored in special table? > > > MF> See the "System Columns" section in the "Data Definition" chapter > MF> of the PostgreSQL documentation. Tables that store objects with > MF> OIDs should have an oid column; you could query pg_attribute to > MF> find out what tables those are. > I have already read about "System Columns" of the PostgreSQL documentation. > In the table "pg_catalog.pg_attribute" column "attrelid" contain > only "system OID's" but not OID's from records of the user tables. > > But I would like to use OID's of all records of the all my tables. > ^^^ ^^^ > I try to use rules on INSERT action of my tables to store last insert > oid, but at the moment of the INSERT row into table OID value > inaccessible (unknown). You are aware that OIDs aren't guaranteed to be unique, aren't you? >>>I would like use some SQL queries with the all OID's. > > > MF> To what end? Are you aware that PostgreSQL allows tables to be > MF> created without OIDs? > Yes, of course, but in my case I create tables with OID and then want use > OID of all records of the all tables as one column in some query. > > I think what system of OID's is very useful for application! > > MF> What problem are you trying to solve? > For example, I want to fetching all rows of the several tables in one > query by means of LEFT JOIN, but not use UNION operator. Joins are designed to be over primary keys, you should make sure you have valid pkeys defined and use those instead. -- Richard Huxton Archonet Ltd