Partitioning on Table with Foreign Key - Mailing list pgsql-general

From Yan Cheng Cheok
Subject Partitioning on Table with Foreign Key
Date
Msg-id 406758.87941.qm@web65713.mail.ac4.yahoo.com
Whole thread Raw
Responses Re: Partitioning on Table with Foreign Key
List pgsql-general
I am referring to http://www.postgresql.org/docs/current/static/ddl-partitioning.html

I have the follow table :

table lot
=========
id | date |
1   2010-01-19 13:53:57.713
2   2010-01-20 11:34:11.856


table measurement
=========
id | fk_lot_id |
1    2
2    2
3    2
4    2
5    2
6    2
7    2
8    2

table measurement will have a *lot* of row (millions). I want to speed up write and read access. Hence, I use partition
technique.

CREATE TABLE measurement_y2006m02 (
    CHECK ( date >= DATE '2006-02-01' AND date < DATE '2006-03-01' )
) INHERITS (measurement);

Opps! But measurement do not have date column. How I can refer to measurement's lot's date?

Thanks and Regards
Yan Cheng CHEOK





pgsql-general by date:

Previous
From: Bjørn T Johansen
Date:
Subject: 64bits or 32 bits on ESX?
Next
From: Grzegorz Jaśkiewicz
Date:
Subject: Re: About partitioning