Re: partitioned table insert triggers

From: Reece Hart <reece(at)harts(dot)net>
To: ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: partitioned table insert triggers
Date: 2008-06-23 02:42:20
Message-ID: 1214188940.6783.34.camel@snafu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 2008-06-23 at 10:18 +0900, ITAGAKI Takahiro wrote:

> You need to do so in 8.3:
> EXECUTE 'INSERT INTO ' || ctable ||
> ' VALUES( (' || quote_literal(new) || '::' || ptable ||
> ').*)';
>
> In 8.4, the next release, you will be able to use a better way:
> EXECUTE 'INSERT INTO ' || ctable || ' VALUES( ($1).* )' USING new;

Domo arigato, Itagaki-san. (I think I got that right.)

The 8.3 method works like a charm.

-Reece

--
Reece Hart, http://harts.net/reece/, GPG:0x25EC91A0

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bill Thoen 2008-06-23 14:13:57 Re: Importing undelimited files (Flat Files or Fixed-Length records)
Previous Message ITAGAKI Takahiro 2008-06-23 01:18:36 Re: partitioned table insert triggers