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

Re: [HACKERS] Writing Trigger Functions in C

2012-12-29 Thread Robert Haas
On Mon, Dec 24, 2012 at 10:43 AM, Charles Gomes wrote: > And I had no performance improvements at all. > Took the same time as with the previous EXECUTE statement; > > I don't see what am I doing wrong. You might not be doing anything wrong. Triggers ARE slow. If you have "perf" on your system,

Re: [HACKERS] Writing Trigger Functions in C

2012-12-24 Thread Charles Gomes
> From: charle...@outlook.com > To: cbbro...@gmail.com > CC: pgsql-hackers@postgresql.org > Subject: Re: [HACKERS] Writing Trigger Functions in C > Date: Fri, 21 Dec 2012 12:27:26 -0500 > > > > D

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

Re: [HACKERS] Writing Trigger Functions in C

2012-12-21 Thread Pavel Stehule
2012/12/21 Joe Conway : > On 12/21/2012 08:39 AM, Merlin Moncure wrote: >> On Fri, Dec 21, 2012 at 10:25 AM, Charles Gomes >> wrote: >>> 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

Re: [HACKERS] Writing Trigger Functions in C

2012-12-21 Thread Christopher Browne
On Fri, Dec 21, 2012 at 11:25 AM, Charles Gomes wrote: > > 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

Re: [HACKERS] Writing Trigger Functions in C

2012-12-21 Thread Joe Conway
On 12/21/2012 08:39 AM, Merlin Moncure wrote: > On Fri, Dec 21, 2012 at 10:25 AM, Charles Gomes wrote: >> 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. >>

Re: [HACKERS] Writing Trigger Functions in C

2012-12-21 Thread Pavel Stehule
Hello you can find lot of examples in PostgreSQL source code - see postgresql/contrib/spi directory and documentation http://www.postgresql.org/docs/9.0/static/trigger-example.html Regards Pavel Stehule 2012/12/21 Charles Gomes : > Hello guys, > > I've been finding performance issues when us

Re: [HACKERS] Writing Trigger Functions in C

2012-12-21 Thread Merlin Moncure
On Fri, Dec 21, 2012 at 10:25 AM, Charles Gomes wrote: > 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

[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