From: | Robert Treat <xzilla(at)users(dot)sourceforge(dot)net> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Cc: | Reece Hart <reece(at)harts(dot)net>, Ram Ravichandran <ramkaka(at)gmail(dot)com>, Erik Jones <erik(at)myemma(dot)com> |
Subject: | Re: Postgresql partitioning |
Date: | 2008-03-22 23:55:17 |
Message-ID: | 200803221955.17789.xzilla@users.sourceforge.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Saturday 22 March 2008 09:39, Reece Hart wrote:
> On Fri, 2008-03-21 at 23:00 -0400, Ram Ravichandran wrote:
> > I assume that primary key
> > uniqueness is not tested across tables. Right?
>
> That's correct. It's on the TODOs:
> Inheritance
> * Allow inherited tables to inherit indexes, UNIQUE constraints,
> and primary/foreign keys
> (at http://www.postgresql.org/docs/faqs.TODO.html )
>
>
> I wonder whether you might be able to achieve the benefits of
> partitioning and the simplicity of a single-table updates by using a
> view with an update rule. This would allow you to embed the logic for
> moving rows between partitions when the partition criterion changes into
> the database. I've not done this myself, so I'm, um, not speaking from
> experience.
>
Actually you can add an update rule to the parent table itself, rewriting
into a set of insert, delete statements. (or call a function to manage it
which is probably better on a larger number of partitions)
--
Robert Treat
Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Treat | 2008-03-23 00:03:17 | Re: Postgres development |
Previous Message | Bruce Momjian | 2008-03-22 22:05:54 | Re: partitioning using dblink |