Re: [GENERAL] partitioned table insert triggers

2008-06-22 Thread Reece Hart
On Mon, 2008-06-23 at 10:18 +0900, ITAGAKI Takahiro wrote: > You need to do so in 8.3: > EXECUTE 'INSERT INTO ' || ctable || > ' VALUES( (' || quote_literal(new) || '::' || ptable || > ').*)'; > > In 8.4, the next release, you will be able to use a better way: > EXECUTE 'INSER

Re: [GENERAL] partitioned table insert triggers

2008-06-22 Thread ITAGAKI Takahiro
Reece Hart <[EMAIL PROTECTED]> wrote: > c := 'INSERT INTO ' || ctable || ' VALUES (NEW.*)'; > Now that my only idea is gone, the question for y'all is: how? > > ?(Okay, I actually do have one more idea: construct the insert values > list with quote_literal. I'm hoping there's a bett

[GENERAL] partitioned table insert triggers

2008-06-21 Thread Reece Hart
I'm trying to create a date-partitioned version of the postgres_log table that is described here: http://www.postgresql.org/docs/current/static/runtime-config-logging.html In lieu of hardcoding the partition table names in the trigger, as shown in the table partitioning docs, I wanted to dynamica