Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dF5Ne-0002R8-R4 for pgsql-bugs@arkaria.postgresql.org; Sun, 28 May 2017 21:05:42 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dF5Ne-0000vi-An for pgsql-bugs@arkaria.postgresql.org; Sun, 28 May 2017 21:05:42 +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_2) (envelope-from ) id 1dF5Mv-00085B-DL for pgsql-bugs@postgresql.org; Sun, 28 May 2017 21:04:57 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dF5Mo-00058H-RQ for pgsql-bugs@postgresql.org; Sun, 28 May 2017 21:04:56 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v4SL4PNJ030476; Sun, 28 May 2017 17:04:25 -0400 From: Tom Lane To: Michael Paquier cc: Amit Langote , tianbing@highgo.com, PostgreSQL mailing lists Subject: Re: BUG #14666: Question on money type as the key of partitioned table In-reply-to: References: <20170524024550.29935.14396@wrigleys.postgresql.org> Comments: In-reply-to Michael Paquier message dated "Fri, 26 May 2017 16:29:06 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <30474.1496005465.1@sss.pgh.pa.us> Date: Sun, 28 May 2017 17:04:25 -0400 Message-ID: <30475.1496005465@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Michael Paquier writes: > Just mentioning... I found surprising to see that failing with a > partition error: > =# create table test(m money) partition by list(m); > CREATE TABLE > =# create table test_1 partition of test for values in (10::money); > ERROR: 42601: syntax error at or near "::" Well, this is a misunderstanding of the syntax: the values in the values list have to be simple literals, not expressions. However, it's arguably not your fault, because the CREATE TABLE reference page says that the list elements are "bound_literal"s, a term which AFAICS is defined nowhere. I'm inclined to change that to something like IN ( { numeric_literal | string_literal | NULL } [, ...] ) which seems less likely to leave the reader wondering what is meant. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs