Re: [GENERAL] Partitioning table and dynamic SQL in trigger

2009-11-24 Thread silly8888
How about: IF date_trunc('month',NEW.effective_date)=date_trunc('month',now()) THEN . On Tue, Nov 24, 2009 at 7:22 AM, Michal Szymanski wrote: > In our DB we create partition table for each month (our naming > convetion is follow , and I would like to create trigger that insert > d

[GENERAL] Partitioning table and dynamic SQL in trigger

2009-11-24 Thread Michal Szymanski
In our DB we create partition table for each month (our naming convetion is follow , and I would like to create trigger that insert data to appropriate partition table accounting.cdr_y2009m05, accounting.cdr_y2009m06 etc..). What is the best solution to create such trigger? I can create trigger fu