Received: from gnumed.dhs.org (modem59.malleenet.net.au [203.143.67.123] (may be forged)) by postgresql.org (8.11.3/8.11.4) with SMTP id f9P3nhP52521 for ; Wed, 24 Oct 2001 23:49:46 -0400 (EDT) (envelope-from hherb@malleenet.net.au) Received: (qmail 30848 invoked by uid 8); 25 Oct 2001 03:49:26 -0000 Message-ID: <20011025034926.30847.qmail@gnumed.dhs.org> Received: from pc-00071.e-smith.gnumed.dhs.org (192.168.1.71, claiming to be "there") by bifrost.e-smith.gnumed.dhs.org with SMTP id smtpdsHOyzU; Thu, 25 Oct 2001 13:49:17 EST Content-Type: text/plain; charset="iso-8859-1" From: Horst Herb To: pgsql-sql@postgresql.org Subject: Re: GUID in postgres Date: Thu, 25 Oct 2001 13:53:27 +1000 X-Mailer: KMail [version 1.3.1] References: <87adyhx7ew.fsf@toncho.dhh.gt.org> In-Reply-To: <87adyhx7ew.fsf@toncho.dhh.gt.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Archive-Number: 200110/351 X-Sequence-Number: 5304 On Thursday 25 October 2001 03:41, John Hasler wrote: > Josh writes: > > I'm sure you could make your own GUID, whatever one is. > > Globally Unique IDentifier, probably. Just hash a 128 bit random number > with the current date. That gives you no gurantee it will be unique. What we are using is the following: - All tables in need of a global ID _within_ a database inherit a globid table which contains nothing but an ID of type serial. - When we need cross-database unique IDs within the same system, the globid table contains a database identifier as well (like the OID of the pg_database entry for the database). Horst