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

From Robert Haas
Subject Re: Partitioning option for COPY
Date
Msg-id 603c8f070911250614v9a4af61v6910f362896fc20@mail.gmail.com
Whole thread Raw
In response to Re: Partitioning option for COPY  (Hannu Krosing <hannu@2ndQuadrant.com>)
Responses Re: Partitioning option for COPY
List pgsql-hackers
On Wed, Nov 25, 2009 at 5:03 AM, Hannu Krosing <hannu@2ndquadrant.com> wrote:
> I'd propose that triggers on both parent table and selected child are
> executed.

I was thinking we should make the partitioning decision FIRST, before
any triggers are fired, and then fire only those triggers relevant to
the selected partition.  If the BEFORE triggers on the partition
modify the tuple in a way that makes it incompatible with the table
constraints on that partition, the insert (or update) fails.

Firing triggers on more than one table is pretty substantially
incompatible with what we do elsewhere and I'm not clear what we get
in exchange.  What is the use case for this?

...Robert


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: SE-PgSQL patch review
Next
From: Emmanuel Cecchet
Date:
Subject: Re: Partitioning option for COPY