Received: from temp.joelburton.com (temp.joelburton.com [209.190.238.101]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f9MJqXP87204 for ; Mon, 22 Oct 2001 15:52:33 -0400 (EDT) (envelope-from joel@joelburton.com) Received: by temp.joelburton.com (Postfix, from userid 501) id A9A0D2B961; Mon, 22 Oct 2001 15:54:28 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by temp.joelburton.com (Postfix) with ESMTP id A78C92B95E; Mon, 22 Oct 2001 15:54:28 -0400 (EDT) Date: Mon, 22 Oct 2001 15:54:28 -0400 (EDT) From: Joel Burton To: Josh Berkus Cc: Aasmund Midttun Godal , Subject: Re: oid's in views. In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200110/300 X-Sequence-Number: 5253 On Mon, 22 Oct 2001, Josh Berkus wrote: > Each significant data table contains one column, the first column, > called "usq", for "universal sequence". This usq field may or may not > be the primary key for the table, but does have a unique index. The usq > is populated by a single sequence "universal_sq" which is shared between > tables, thus allowing all tables usq uniqueness between them. > > This strategy has allowed me to write a number of functions which are > table-agnostic, needing only the usq to do their job (such as a function > that creates modification hisotry). Josh -- Good example! I'll bet a lot of PG users may have never realized that you can use the same sequence across several tables. -- Joel BURTON | joel@joelburton.com | joelburton.com | aim: wjoelburton Independent Knowledge Management Consultant