Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 6534B634B5A for ; Wed, 9 Sep 2009 11:35:53 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 77437-02 for ; Wed, 9 Sep 2009 14:35:45 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from relay.pcl-ipout02.plus.net (relay.pcl-ipout02.plus.net [212.159.7.100]) by mail.postgresql.org (Postfix) with ESMTP id BA6AB6323AD for ; Wed, 9 Sep 2009 11:35:45 -0300 (ADT) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEAKdap0rUnw4U/2dsb2JhbADfAoItgWsF Received: from pih-relay08.plus.net ([212.159.14.20]) by relay.pcl-ipout02.plus.net with ESMTP; 09 Sep 2009 15:35:36 +0100 Received: from [84.51.143.99] (helo=server3.office.archonet.com) by pih-relay08.plus.net with esmtp (Exim) id 1MlOGm-0000w7-4R; Wed, 09 Sep 2009 15:35:36 +0100 Received: from [192.168.1.36] (dell36.office.archonet.com [192.168.1.36]) by server3.office.archonet.com (Postfix) with ESMTP id DC9E9274069; Wed, 9 Sep 2009 15:35:35 +0100 (BST) Message-ID: <4AA7BD37.7020407@archonet.com> Date: Wed, 09 Sep 2009 15:35:35 +0100 From: Richard Huxton User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: Sridhar Reddy Ratna CC: pgsql-sql@postgresql.org Subject: Re: trigger failed to identify the partions References: <17DD0201A12947039313F26974E8E9B4@Sridharvisic> <4AA77DD7.5040908@archonet.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Plusnet-Relay: 8fc641db12335b1ef9968c395da68665 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.74 tagged_above=-10 required=5 tests=BAYES_20=-0.74, RCVD_IN_DNSWL_LOW=-1 X-Spam-Level: X-Archive-Number: 200909/38 X-Sequence-Number: 33103 Sridhar Reddy Ratna wrote: > > cmd := 'INSERT INTO ' || dateTable || > EXECUTE cmd; > RETURN NEW; > If I changed the RETURN NEW to RETURN NULL its inserting only one row. Yes. RETURN NEW allows the insert to procede normally so you end up with the two rows. > But to work with hibernate I need the return NEW statement. Hmm - not sure I can see a way around this. Maybe someone else who knows Hibernate can help. -- Richard Huxton Archonet Ltd