Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZTf6F-0007ov-KU for pgsql-hackers@arkaria.postgresql.org; Sun, 23 Aug 2015 23:54:55 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZTf6F-0005Dq-1J for pgsql-hackers@arkaria.postgresql.org; Sun, 23 Aug 2015 23:54:55 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZTf4y-0003mO-2P for pgsql-hackers@postgresql.org; Sun, 23 Aug 2015 23:53:36 +0000 Received: from mx-out.zmailcloud.com ([192.198.85.98] helo=mx-out-1.zmailcloud.com) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1ZTf4p-0004nR-9D for pgsql-hackers@postgresql.org; Sun, 23 Aug 2015 23:53:34 +0000 Received: from smtp.01.com (smtp.01.com [10.10.0.43]) by mx-out-1.zmailcloud.com (Postfix) with ESMTP id 12DA2564203; Sun, 23 Aug 2015 18:53:25 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by smtp-out-2.01.com (Postfix) with ESMTP id 080FB601C8; Sun, 23 Aug 2015 18:53:25 -0500 (CDT) X-Virus-Scanned: amavisd-new at smtp-out-2.01.com Received: from smtp.01.com ([127.0.0.1]) by localhost (smtp-out-2.01.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mkd5BEtp8YT8; Sun, 23 Aug 2015 18:53:24 -0500 (CDT) Received: from smtp.01.com (localhost [127.0.0.1]) by smtp-out-2.01.com (Postfix) with ESMTP id D49EC601EB; Sun, 23 Aug 2015 18:53:24 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by smtp-out-2.01.com (Postfix) with ESMTP id BD283601E0; Sun, 23 Aug 2015 18:53:24 -0500 (CDT) X-Virus-Scanned: amavisd-new at smtp-out-2.01.com Received: from smtp.01.com ([127.0.0.1]) by localhost (smtp-out-2.01.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 6t5qpScafvtb; Sun, 23 Aug 2015 18:53:24 -0500 (CDT) Received: from [192.168.47.106] (50-1-62-61.dsl.dynamic.fusionbroadband.com [50.1.62.61]) by smtp-out-2.01.com (Postfix) with ESMTPSA id 1F984601C8; Sun, 23 Aug 2015 18:53:23 -0500 (CDT) Message-ID: <55DA5CF2.5080207@agliodbs.com> Date: Sun, 23 Aug 2015 16:53:22 -0700 From: Josh Berkus Organization: PostgreSQL Experts Inc. User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 To: Jim Nasby , Amit Langote , Pg Hackers Subject: Re: Declarative partitioning References: <55D3093C.5010800@lab.ntt.co.jp> <55D36BFA.7080004@agliodbs.com> <55D7EDBD.50008@BlueTreble.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) 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 On 08/21/2015 08:34 PM, Jim Nasby wrote: > On 8/18/15 12:31 PM, Josh Berkus wrote: >> Also this would be useful for range >> partitions: >> >> CREATE PARTITION ON parent_table USING ( start_value ); >> >> ... where start_value is the start range of the new partition. Again, >> easier for users to get correct. > > Instead of that, I think it would be more foolproof to do > > CREATE PARTITION ON parent_table FOR ( value1, ... ); > > instead of trusting the user to get the exact start value correct. > > Though... I guess there could be value in allowing an exact start value > but throwing an error if it doesn't sit exactly on a boundary. Might > make it less likely to accidentally create the wrong partition. Well, I'm figuring that most people would use "CREATE NEXT PARTITION" instead. -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers