Re: Bulk load straight into partitioned table? - Mailing list pgsql-novice

From Joshua Tolley
Subject Re: Bulk load straight into partitioned table?
Date
Msg-id AANLkTikyYLF7-rT6mT0J7wkioo-cYho-fEPKuLYVrmfl@mail.gmail.com
Whole thread Raw
In response to Bulk load straight into partitioned table?  (Danny Lo <lo.dannyk@gmail.com>)
List pgsql-novice
On Wed, May 19, 2010 at 4:13 PM, Danny Lo <lo.dannyk@gmail.com> wrote:
> Hi,
>
> I have about 150gb data that I'd like to bulk load into a table partitioned
> by month. I'm wondering if I could use the COPY command with a trigger on
> table to copy this in directly?
> At the moment, I'm doing:
>
> copy command into table_x
>
> then sql command:
>
> insert into master_table_a
> select * from table_x
>
> thanks,
> Danny

This, or copying directly into the table, should work fine. Per the
documentation:

"COPY FROM will invoke any triggers and check constraints on the
destination table. However, it will not invoke rules."
 (http://www.postgresql.org/docs/8.4/interactive/sql-copy.html)

--
Joshua Tolley   eggyknap
End Point Corporation

pgsql-novice by date:

Previous
From: Danny Lo
Date:
Subject: Bulk load straight into partitioned table?
Next
From: Giancarlo Boaron
Date:
Subject: Some undefined function errors