Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id E27D964FC2A for ; Tue, 16 Dec 2008 04:19:38 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 63338-05 for ; Tue, 16 Dec 2008 04:19:35 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from outbound-mail-342.bluehost.com (outbound-mail-342.bluehost.com [66.147.249.3]) by mail.postgresql.org (Postfix) with SMTP id 5D4AB64FC04 for ; Tue, 16 Dec 2008 04:19:35 -0400 (AST) Received: (qmail 15543 invoked by uid 0); 16 Dec 2008 08:18:21 -0000 Received: from unknown (HELO fast22.fastdomain.com) (74.220.199.22) by outboundproxy7.bluehost.com.bluehost.com with SMTP; 16 Dec 2008 08:18:21 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=frogthinker.org; h=Received:Message-ID:Date:From:Organization:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding:X-Identified-User; b=fQqevg6H79jXXfsjiU2dGmLS88Zt9CkymMz5G15jVk5JKQ3IjpFyMFjCKPNtiyR9DfRXe4TBR7bYFUUYxO2nexhdJ+dERynW8maFb+sdbjV7ZKg0ZHN1MUAegUY3LmVG; Received: from 70.57.125.209.transedge.com ([209.125.57.70] helo=[10.2.23.198]) by fast22.fastdomain.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1LCV9S-0004oS-4R; Tue, 16 Dec 2008 01:19:34 -0700 Message-ID: <49476493.1080000@frogthinker.org> Date: Tue, 16 Dec 2008 03:19:31 -0500 From: Emmanuel Cecchet Organization: Frog Thinker User-Agent: Thunderbird 2.0.0.18 (Windows/20081105) MIME-Version: 1.0 To: ITAGAKI Takahiro CC: PostgreSQL-development Subject: Re: Fwd: [PATCHES] Auto Partitioning Patch - WIP version 1 References: <20081216153856.C013.52131E4D@oss.ntt.co.jp> <494759D0.1090002@frogthinker.org> <20081216163936.C016.52131E4D@oss.ntt.co.jp> In-Reply-To: <20081216163936.C016.52131E4D@oss.ntt.co.jp> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Identified-User: {2846:fast22.fastdomain.com:frogthin:frogthinker.org} {sentby:smtp auth 209.125.57.70 authed with manu+frogthinker.org} X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.41 tagged_above=0 required=5 tests=SUBJECT_FUZZY_TION=0.41 X-Spam-Level: X-Archive-Number: 200812/1242 X-Sequence-Number: 129871 ITAGAKI Takahiro wrote: > The chained triggers would have better flexibilty, and the auto expanding > trigger would have better usability. I'm not sure about performance > because expanding child partitions is not always faster than chained > calls of triggers. > > I think chained triggers are hard to maintain. If we drop one of partition > tables, we need to reconnect the single-linked-list of the triggers. > When you drop one child table, you would also have to drop the trigger that has the same name on the parent table. This does not seem too hard but I may be missing something. >>> server says "INSERT 0 row" though rows are inserted into child tables. >>> >> Technically this is correct since 0 rows were inserted in the parent >> table. >> > Yes, but users expect non-0 result normally. Some O/R mapping tools > also checks the result exactly and raises errors (it could be turned > off, but default is on). > If the O/R mapping tool is also creating the table it should be aware of the semantics specifics to partition. But your comment is well taken, this seems counterintuitive and against most API semantics to return 0 when the number of inserted rows is expected. This would certainly require some additional hooks to return the proper value. Best regards, Emmanuel > Regards, > --- > ITAGAKI Takahiro > NTT Open Source Software Center > -- Emmanuel Cecchet FTO @ Frog Thinker Open Source Development & Consulting -- Web: http://www.frogthinker.org email: manu@frogthinker.org Skype: emmanuel_cecchet