Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hvPEO-0003B4-Iz for pgsql-hackers@arkaria.postgresql.org; Wed, 07 Aug 2019 16:56:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hvPEN-0006KL-4O for pgsql-hackers@arkaria.postgresql.org; Wed, 07 Aug 2019 16:56:07 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1hvPEM-0006Jk-Sl for pgsql-hackers@lists.postgresql.org; Wed, 07 Aug 2019 16:56:06 +0000 Received: from mail-qk1-x742.google.com ([2607:f8b0:4864:20::742]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hvPEK-0003hh-02 for pgsql-hackers@lists.postgresql.org; Wed, 07 Aug 2019 16:56:06 +0000 Received: by mail-qk1-x742.google.com with SMTP id w190so66345364qkc.6 for ; Wed, 07 Aug 2019 09:56:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=UtyxaMrXagX2VuR4Ugnefk9I3sZDTqepubem5YKGpe0=; b=WOqJjq8kHj8ur1AcrpbLHpat95syBsY8AWfI7Yb9+Ly9L7kmyTAHI3ZU+OfD74raat eQ+DjhjDHtKaz0oFBgf0IAehSQVAFqHy8z1X2oDoe+9c1spYqWyrSicpI84J9HmlLAiY 8qHvT+UJC0+icnQ1p7D2CJNqZIO67HKnyK4vYEeSk1CSIdlJ77OonF6N3lI1ODBUHfC4 q8XlR3aw3q09gS4oUd8iDp81p2Ku5VGyf4m4vW81/B/wWQLs76ADGx0Ra/ydGwrDjpjf +5XMrQVQ6RZPsg9eVVNUgdmKh9OXDFTPoeBRZzcdQnM0d1gO8DX7nhL5Xd2pJmEgmBKG apvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=UtyxaMrXagX2VuR4Ugnefk9I3sZDTqepubem5YKGpe0=; b=AAch6ktGAc1By9uCH6HdlWVOBSVSZq9IMk3ot0zoY5vs1bBJsZdVUkeIcdS52v19Rv iN97lH7vQ/aE7Lat+gwgMzI1Gm+dzPxjsQlUbnSJE2kOTfV2YfGUtYpxCuFvCCxQxOwx wWfr3GZgcZ4adkID3DJXeAaI8aumOW0h2/e/lro8ySR/El/U3dd13ai9dUdjnx0FnW9O T3X/rKFgyoeZ/kZiP2EzLzfP3J2GBSHnS27TN6lthajDxlHk/f8eqQuQYUBEh5/BKIWJ ZpR2FzJ567X+hMTa2YkaUJRG441X+xTiv7uZ0ubkNWYuSc6dm3+GXrDybnMMOlfIcSNs Te7w== X-Gm-Message-State: APjAAAVU1VuO6xU2lLU7YEmoBMABo8LExudYmjHZm+6e9ILCltN4HaFg 3gCHCy6p6/U6zuxyp9X3rFDzAg== X-Google-Smtp-Source: APXvYqyWRxSDDyX9ScVe0l2ICDuAMNuvvx/C7kjAXSn0k2YeipOtdCF7XAUQUWAhYWCXeipnwJDfgg== X-Received: by 2002:a37:274a:: with SMTP id n71mr8519581qkn.448.1565196961719; Wed, 07 Aug 2019 09:56:01 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([190.217.183.1]) by smtp.gmail.com with ESMTPSA id y42sm57526125qtc.66.2019.08.07.09.56.00 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 07 Aug 2019 09:56:01 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 1150712061D; Wed, 7 Aug 2019 12:55:59 -0400 (-04) Date: Wed, 7 Aug 2019 12:55:59 -0400 From: Alvaro Herrera To: Tom Lane Cc: Amit Langote , Pg Hackers Subject: Re: no default hash partition Message-ID: <20190807165559.GA29538@alvherre.pgsql> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="dDRMvlgZJXvWKvBx" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5255.1565196253@sss.pgh.pa.us> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --dDRMvlgZJXvWKvBx Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit On 2019-Aug-07, Tom Lane wrote: > Alvaro Herrera writes: > > Actually, it also says this (in the blurb for the PARTITION OF clause): > > > Creates the table as a partition of the specified > > parent table. The table can be created either as a partition for specific > > values using FOR VALUES or as a default partition > > using DEFAULT. This option is not available for > > hash-partitioned tables. > > > which I think is sufficient. > > Hm, that's rather confusingly worded IMO. Is the antecedent of "this > option" just DEFAULT, or does it mean that you can't use FOR VALUES, > or perchance it means that you can't use a PARTITION OF clause > at all? Uh, you're right, I hadn't noticed that. Not my text. I think this can be fixed easily as in the attached. There are other options, but I like this one the best. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services --dDRMvlgZJXvWKvBx Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="default-restrict.patch" diff --git a/doc/src/sgml/ref/create_table.sgml b/doc/src/sgml/ref/create_table.sgml index 9009addb9c..a74fde42d4 100644 --- a/doc/src/sgml/ref/create_table.sgml +++ b/doc/src/sgml/ref/create_table.sgml @@ -399,8 +399,7 @@ WITH ( MODULUS numeric_literal, REM Creates the table as a partition of the specified parent table. The table can be created either as a partition for specific values using FOR VALUES or as a default partition - using DEFAULT. This option is not available for - hash-partitioned tables. + using DEFAULT. @@ -491,8 +490,8 @@ WITH ( MODULUS numeric_literal, REM If DEFAULT is specified, the table will be - created as a default partition of the parent table. The parent can - either be a list or range partitioned table. A partition key value + created as a default partition of the parent table. This option + is not available for hash-partitioned tables. A partition key value not fitting into any other partition of the given parent will be routed to the default partition. There can be only one default partition for a given parent table. --dDRMvlgZJXvWKvBx--