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 f33ed165-de6d-4e4c-bb6f-ac458c1fb67f@d32g2000yqh.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: Whit Armstrong
Date:
Subject: Re: partitioning question -- how to guarantee uniqueness across partitions
Next
From: Arndt Lehmann
Date:
Subject: Re: partitioning question -- how to guarantee uniqueness across partitions