Search Postgresql Archives

Re: partitioning question -- how to guarantee uniqueness across partitions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Whit Armstrong <armstrong.whit@xxxxxxxxx> writes:
> I have a simple example copied from the 8.3 manual on partitioning
> (http://www.postgresql.org/docs/8.3/interactive/ddl-partitioning.html).

> My question is, if you create a serial type in the parent table which
> is meant to be the primary key across all the partitions, how does one
> guarantee uniqueness of that key?

One doesn't.  That is not an appropriate way to set up a partitioned
table.  You need a primary key that can actually be used as a meaningful
partitioning key.  In this example, the id is completely useless and
what you should be looking at is making the data_value be the primary
key.

			regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux