Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id DDA411337B3E for ; Fri, 1 Apr 2011 14:32:36 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 04102-06 for ; Fri, 1 Apr 2011 17:32:26 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp-1.01.com (smtp-1.01.com [38.102.63.180]) by mail.postgresql.org (Postfix) with ESMTP id 66326133798E for ; Fri, 1 Apr 2011 14:32:26 -0300 (ADT) Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp-1.01.com (Postfix) with ESMTP id 504CDE2801 for ; Fri, 1 Apr 2011 12:32:25 -0500 (CDT) Received: from smtp-1.01.com ([127.0.0.1]) by localhost (smtp-1.01.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dpC-XEMwXz8K for ; Fri, 1 Apr 2011 12:32:25 -0500 (CDT) Received: by smtp-1.01.com (Postfix, from userid 99) id 3207AE31AC; Fri, 1 Apr 2011 12:32:25 -0500 (CDT) Received: from Sidney-Stratton.local (dsl081-245-111.sfo1.dsl.speakeasy.net [64.81.245.111]) by smtp-1.01.com (Postfix) with ESMTPSA id EA2E0E247D for ; Fri, 1 Apr 2011 12:32:24 -0500 (CDT) Message-ID: <4D960C28.9020401@agliodbs.com> Date: Fri, 01 Apr 2011 10:32:24 -0700 From: Josh Berkus Organization: PostgreSQL Experts Inc. User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: table contraints checks only happen in planner phase References: In-Reply-To: X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201104/3 X-Sequence-Number: 43065 On 3/31/11 5:41 PM, Joseph Shraibman wrote: > Is there a reason that when executing queries the table constraints are > only checked during planning and not execution? I end up making 2 round > trips to the database to get around this. This is a limitation with our current partitioning implementation. It only understands literal values, not JOINs. -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com