Re: Table Partition - Mailing list pgsql-general

From Scott Marlowe
Subject Re: Table Partition
Date
Msg-id 1114182901.13303.55.camel@state.g2switchworks.com
Whole thread Raw
In response to Table Partition  ("Dinesh Pandey" <dpandey@secf.com>)
List pgsql-general
On Fri, 2005-04-22 at 05:51, Dinesh Pandey wrote:
> How to create this table  (with partition) in Postgres.
>
>
>
> --ORACLE
>
> CREATE TABLE A (col1         NUMBER         NOT NULL,
>
>                    col2              DATE            NOT NULL,
>
>                    col3              VARCHAR2(500)
>
>           )
>
>           PARTITION BY RANGE (col2) (
>
>                    PARTITION partition_one VALUES LESS THAN
> (TO_DATE('01/04/2001', 'DD/MM/YYYY')) TABLESPACE MYTABSPACE
>
>           );

Unfortunately, postgresql does not currently support partitioning.

If you want this, you'll have to "roll your own" so to speak.  You'll
need to create two different tables in two different tablespaces, create
a view on top of them, and then create on update triggers to put the
data into the right table when it comes in.

it's a pain, but it works.

pgsql-general by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: UltraSPARC versus AMD
Next
From: David Wheeler
Date:
Subject: Re: Multiple RULES on Views