Re: Partitioning option for COPY

From: Hannu Krosing <hannu(at)2ndQuadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Emmanuel Cecchet <manu(at)asterdata(dot)com>, Emmanuel Cecchet <Emmanuel(dot)Cecchet(at)asterdata(dot)com>, Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, Simon Riggs <simon(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Partitioning option for COPY
Date: 2009-11-25 23:04:36
Message-ID: 1259190276.30357.206.camel@hvost1700
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2009-11-25 23:28:29 Re: Partitioning option for COPY
Previous Message Hannu Krosing 2009-11-25 22:58:30 Re: Partitioning option for COPY