Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 150E775D0B1 for ; Tue, 8 Nov 2011 20:35:59 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 49992-05 for ; Wed, 9 Nov 2011 00:35:53 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from mail-gx0-f174.google.com (mail-gx0-f174.google.com [209.85.161.174]) by mail.postgresql.org (Postfix) with ESMTP id 6BB1C75D0B0 for ; Tue, 8 Nov 2011 20:35:52 -0400 (AST) Received: by ggnb2 with SMTP id b2so1168392ggn.19 for ; Tue, 08 Nov 2011 16:35:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=KCYI71trGjJyvKtvXLpSFc5xXt3YjmxQp6XpPhDUYD4=; b=auYdhYQr19agPfbPjRmp/NsCv+Of5CJvp8Qwn5C7C4korb+MCkn737AaAALuJeKq2E hsAFbn7JeRyvpvPg9OvZ6K9+iS1gfk2bHhRz+Fej37FlQKC8MjVEFcsJRHZzTuldUqvo cjtHPolJtXEsfwyZmyzhNplr6iKnmGJ2XcZ40= Received: by 10.68.37.97 with SMTP id x1mr995023pbj.14.1320798952056; Tue, 08 Nov 2011 16:35:52 -0800 (PST) MIME-Version: 1.0 Received: by 10.68.66.170 with HTTP; Tue, 8 Nov 2011 16:35:31 -0800 (PST) In-Reply-To: References: From: Josh Kupershmidt Date: Tue, 8 Nov 2011 19:35:31 -0500 Message-ID: Subject: Re: Partitionning + Trigger and Execute not working as expected To: Sylvain Mougenot Cc: pgsql-sql@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.899 tagged_above=-5 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001 X-Spam-Level: X-Archive-Number: 201111/41 X-Sequence-Number: 36014 On Tue, Nov 8, 2011 at 11:04 AM, Sylvain Mougenot wrote: > EXECUTE 'INSERT INTO '|| currentTableName || ' values (NEW.*)'; The quotes in the above line are wrong; you want it like: EXECUTE 'INSERT INTO '|| currentTableName || ' values ' || (NEW.*); Josh