Re: Partitioning option for COPY - Mailing list pgsql-hackers

From Hannu Krosing
Subject Re: Partitioning option for COPY
Date
Msg-id 1259190276.30357.206.camel@hvost1700
Whole thread Raw
In response to Re: Partitioning option for COPY  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, 2009-11-25 at 11:30 -0500, Tom Lane wrote:
> It seems like the easiest way to resolve this without weird corner
> cases is to say that we fire triggers belonging to the parent table.
> The individual partition child tables either shouldn't have triggers
> at all, or we should restrict the cases in which those are considered
> applicable.

Agreed. maybe allow only ROW-level AFTER triggers (for logging late
arrivals and updates on tables partitioned on time for example )

> As an example, what are you going to do with statement-level triggers?
> Fire them for *every* child whether it receives a row or not?  Doesn't
> seem like the right thing.
> 
> Again, this solution presupposes an explicit concept of partitioned
> tables within the system...

For explicit partitioned tables with hidden partitions it is of course
best to not add extra effort for allowing triggers to be defined on
those (hidden) partitions.

If the partition tables are visible, some trigger support would be good.

>             regards, tom lane


-- 
Hannu Krosing   http://www.2ndQuadrant.com
PostgreSQL Scalability and Availability   Services, Consulting and Training




pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: Partitioning option for COPY
Next
From: Robert Haas
Date:
Subject: Re: Partitioning option for COPY