Re: oid's in views. - Mailing list pgsql-sql

From Joel Burton
Subject Re: oid's in views.
Date
Msg-id Pine.LNX.4.30.0110221553290.635-100000@temp.joelburton.com
Whole thread Raw
In response to oid's in views.  ("Aasmund Midttun Godal" <postgresql@envisity.com>)
List pgsql-sql
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



pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: CREATE RULE ON UPDATE/DELETE
Next
From: "Josh Berkus"
Date:
Subject: Re: oid's in views.