Re: partitioning question -- how to guarantee uniqueness across partitions - Mailing list pgsql-general

From Arndt Lehmann
Subject Re: partitioning question -- how to guarantee uniqueness across partitions
Date
Msg-id 2763fb2a-5211-4205-b19f-ec0d3b37f683@z9g2000yqi.googlegroups.com
Whole thread Raw
In response to partitioning question -- how to guarantee uniqueness across partitions  (Whit Armstrong <armstrong.whit@gmail.com>)
List pgsql-general
> Hi Whit,
>
> you could consider using GUIDs instead of Integer for primary keys.
> Here is a nice blog post explaining how to do this in Rails:
>    http://ariejan.net/2008/08/12/ruby-on-rails-uuid-as-your-activerecord...
>
> Best Regards,
>   Arndt Lehmann

just a note: As per above blog post, the GUID are generated using a
Ruby module.
PostgreSQL actually comes with a baked in UUID column type. That
probably will be a more efficient solution.

Regards,
  Arndt

pgsql-general by date:

Previous
From: Arndt Lehmann
Date:
Subject: Re: partitioning question -- how to guarantee uniqueness across partitions
Next
From: BJ Freeman
Date:
Subject: another can't connect