Re: [HACKERS] Writing Trigger Functions in C

2013-01-03 Thread Charles Gomes
> Date: Sat, 29 Dec 2012 23:45:06 -0500 > Subject: Re: [HACKERS] Writing Trigger Functions in C > From: robertmh...@gmail.com > To: charle...@outlook.com > CC: cbbro...@gmail.com; pgsql-hackers@postgresql.org > > On Mon, Dec 24, 2012

[HACKERS] Whats the correct way to change trigdata->tg_relation

2012-12-28 Thread Charles Gomes
I'm creating a simple trigger that will be called during an insert and change the destination table. All values are going to be preserved, just the destination table will be different. From what I see I can't modify trigdata->tg_relation. All examples use: return Datum(trigdata->tg_trigtuple);

Re: [HACKERS] Writing Trigger Functions in C

2012-12-24 Thread Charles Gomes
ate: Fri, 21 Dec 2012 11:56:25 -0500 > > Subject: Re: [HACKERS] Writing Trigger Functions in C > > From: cbbro...@gmail.com > > To: charle...@outlook.com > > CC: pgsql-hackers@postgresql.org > > > > On Fri, Dec 21, 2012 at 11:25 AM, Charles Gomes > > mailto:ch

Re: [HACKERS] Writing Trigger Functions in C

2012-12-21 Thread Charles Gomes
> Date: Fri, 21 Dec 2012 11:56:25 -0500 > Subject: Re: [HACKERS] Writing Trigger Functions in C > From: cbbro...@gmail.com > To: charle...@outlook.com > CC: pgsql-hackers@postgresql.org > > On Fri, Dec 21, 2012 at 11:25 AM, Charles Go

[HACKERS] Writing Trigger Functions in C

2012-12-21 Thread Charles Gomes
Hello guys, I've been finding performance issues when using a trigger to modify inserts on a partitioned table. If using the trigger the total time goes from 1 Hour to 4 hours. The trigger is pretty simple: CREATE OR REPLACE FUNCTION quotes_insert_trigger() RETURNS trigger AS $$ BEGIN EXECUTE