pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Greg Stark <gsstark@mit.edu>
To: mark@mark.mielke.cc
Cc: Jonah H. Harris <jonah.harris@gmail.com>
Cc: josh@agliodbs.com, pgsql-hackers@postgresql.org, nathan wagner <nw@hydaspes.if.org>
Subject: Re: uuid type for postgres
Date: 06 Sep 2005 17:31:43 -0400
Message-ID: <878xy9x4qo.fsf@stark.xeocode.com> (raw)
In-Reply-To: <20050906203811.GA3069@mark.mielke.cc>
References: <20050906135057.GA24136@granicus.if.org>
	<20050906144930.GA27641@mark.mielke.cc>
	<200509061002.43803.josh@agliodbs.com>
	<36e6829205090612575b954f38@mail.gmail.com>
	<20050906203811.GA3069@mark.mielke.cc>


mark@mark.mielke.cc writes:

> In my choice of use, I'm using them instead of SERIAL columns, as I
> wish to have more freedom merging production data with test data.  I
> wish to continually import production data into my test environment,
> in a single direction. UUID will prevent conflicts from occurring.
> SERIAL cannot (although in theory, I could set my copy of the serial
> value to 1 billion or something hacky - but that doesn't scale in a
> simple fashion to having several test environments). 

Just do something like this for every sequence:

  ALTER SEQUENCE foo INCREMENT BY 100

And then choose a particular initial value for each server.

I agree with the others that uuid seems to be overused in lots of cases where
a simple serial would serve just as well.

However I don't see why a good uuid type is any less of a valid addition to
the set of data types than any of the others. inet, macaddr, all the geometric
types, for example. 

Given the 3-phase commit work going into 8.2 (8.1?) it seems like a pretty
fundamental component of that whole ball of wax. A note in the documentation
that it's designed for use as part of a multiple-database system like that
might be helpful.

-- 
greg




view thread (51+ messages)  latest in thread

Message-ID: <878xy9x4qo.fsf@stark.xeocode.com>
Permalink:  ../878xy9x4qo.fsf@stark.xeocode.com/
Also on:    postgresql.org/message-id/878xy9x4qo.fsf@stark.xeocode.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: gsstark@mit.edu, mark@mark.mielke.cc, jonah.harris@gmail.com, nw@hydaspes.if.org
  Subject: Re: uuid type for postgres
  In-Reply-To: <878xy9x4qo.fsf@stark.xeocode.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox