Re: UPSERT on partition - Mailing list pgsql-hackers

From Jim Nasby
Subject Re: UPSERT on partition
Date
Msg-id 558DD39E.9020807@BlueTreble.com
Whole thread Raw
In response to Re: UPSERT on partition  (Peter Geoghegan <pg@heroku.com>)
List pgsql-hackers
On 6/24/15 1:03 PM, Peter Geoghegan wrote:
> On Wed, Jun 24, 2015 at 11:02 AM, Peter Geoghegan <pg@heroku.com> wrote:
>> I think that the real way to fix this is, as you say, to make it so
>> that it isn't necessary in general to write trigger functions like
>> this to make inheritance work.
>
> Excuse me -- I mean to make *partitioning* work.

It occurs to me that we could run the BEFORE triggers and then pass the 
new tuple to a user-supplied function that returns a regclass. That 
would allow us to know exactly which child/partition the UPSERT should 
be attempted in.
-- 
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Data in Trouble? Get it in Treble! http://BlueTreble.com



pgsql-hackers by date:

Previous
From: Jim Nasby
Date:
Subject: Re: pg_stat_*_columns?
Next
From: Jim Nasby
Date:
Subject: Re: Re: [COMMITTERS] pgsql: psql: show proper row count in \x mode for zero-column output