Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aYycL-00081q-2W for pgsql-hackers@arkaria.postgresql.org; Thu, 25 Feb 2016 16:18:17 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aYycK-0001BJ-Ix for pgsql-hackers@arkaria.postgresql.org; Thu, 25 Feb 2016 16:18:16 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aYy1h-0002pk-BV for pgsql-hackers@postgresql.org; Thu, 25 Feb 2016 15:40:25 +0000 Received: from mail-lf0-x233.google.com ([2a00:1450:4010:c07::233]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1aYy1Y-0001E6-Le for pgsql-hackers@postgresql.org; Thu, 25 Feb 2016 15:40:23 +0000 Received: by mail-lf0-x233.google.com with SMTP id m1so35750634lfg.0 for ; Thu, 25 Feb 2016 07:40:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=e-djuster-com.20150623.gappssmtp.com; s=20150623; h=from:mime-version:thread-index:date:message-id:subject:to :content-type; bh=DCzXieOOUQOOJKzWJ6LImc0H9WYI5qEGqY0hCiJCeA0=; b=PDlggXxo57pqLutsfqiqM9RztIw5sTMzEdn9o2MYBZd1hr66EowoEwt8h3t1y/zQcL gR9Xwyg9fMP0RMsPYhMKpt0f9guDbv2Ml29hu9J/fQlrQx0oNkMBKD5yXcIcoQNy30JQ 9GKyqTmRHPyJQgMb/yiCDb++KBgF4XCtlZfQNwduLsTqIkwcQM46eWToa2V1ROXFUbXz IbcVWaW8NYmQgTmixZ1cJHb+I5bUO7aGxd6CCEm3FcQyibYb1fdo+CfqEN2DtZooYvTq A6S2jxENsg3Ii+Nrd2QDOwgHA4S5WS2bKiDR35DiOS9dntZOIfxhxi5sgzMG719lJkt+ D38A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:mime-version:thread-index:date:message-id :subject:to:content-type; bh=DCzXieOOUQOOJKzWJ6LImc0H9WYI5qEGqY0hCiJCeA0=; b=CRaWWFlb3P5FJspHCgJESmkP2DrAPDRM9YR13mZ07XjC4hp8LOofqbmzzzRQS6bygp YcuiS5Ba6K07MaNvVjpNXK0AL3wJtcTk7zl/cuToukNbwSa3UMUXUnQQld6uX3PGUuwN wGVQhX3pDPjytIf4SS52EmVGngzDO4FAE738/U0OkuXgaCGBOUVAIv8mdkQ4wByl6Grl CgKXyf27t5h8ZmcPsn2smiuZvGRrst1Zu9OYg5NnymbpZF5jhJpfi15raR7WLeDqvLAX mBMzMMyafN92Cm5Fh8yem5I/2012jUXN/maN/KoOzHLthb6vi89wwTR0wc4lk0Iv67yo /RTg== X-Gm-Message-State: AG10YOTdKmuQGQxVjyxOEHILY4YFV2xCq77GW4QNdqPinehdUN/ExBY+3iC66w55eQsBAhDx5Q2+p1mYksmUk7NU X-Received: by 10.25.42.13 with SMTP id q13mr16995809lfq.96.1456414814890; Thu, 25 Feb 2016 07:40:14 -0800 (PST) From: Jean-Pierre Pelletier MIME-Version: 1.0 X-Mailer: Microsoft Outlook 14.0 Thread-Index: AdFv4nk92bwxDT3vRIi+K/769287mw== Date: Thu, 25 Feb 2016 10:40:13 -0500 Message-ID: <84b2c365ce4249588ba91367ee01bece@mail.gmail.com> Subject: Re: Declarative partitioning To: pgsql-hackers@postgresql.org Content-Type: text/plain; charset=UTF-8 X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Why not based it on "Exclusion Constraint" ? Most discussions as of late seems to focus on Range overlaps which appeal (I would think) is that it supports both "equality" and "overlaps", two popular partitioning schemes. "Equality" as in "value1 = value2" can be implemented with "range overlaps" as "range(value1,value) = range(value,value2)". I would think that Partitioning schemes can be Declarative, Efficient and not restricted to Equality and Overlaps as long as all partitions (of a partitioned table) are using a single partitioning definition expressed as: - An Immutable Expression on tuple columns, in the simplest case a single column - An Operator, in the simplest case, "equality" That seems very close to the semantic of "Constraint Exclusion" as described here: http://thoughts.davisjeff.com/2010/09/25/exclusion-constraints-are-general ized-sql-unique/ If partitioning could be based on EC, it would bring these additional benefits: - The choice of operator as long as it is boolean. commutative and Indexable - The use of Expression/Function and not just bare columns Jean-Pierre Pelletier -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers