From: | Joshua Tolley <eggyknap(at)gmail(dot)com> |
---|---|
To: | Danny Lo <lo(dot)dannyk(at)gmail(dot)com> |
Cc: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: Bulk load straight into partitioned table? |
Date: | 2010-05-20 03:06:10 |
Message-ID: | AANLkTikyYLF7-rT6mT0J7wkioo-cYho-fEPKuLYVrmfl@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
On Wed, May 19, 2010 at 4:13 PM, Danny Lo <lo(dot)dannyk(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Felix Obermaier | 2010-05-20 12:41:19 | character encoding problem |
Previous Message | Danny Lo | 2010-05-19 22:13:13 | Bulk load straight into partitioned table? |