From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: Amit Langote <amitlangote09@gmail.com>
Cc: tianbing@highgo.com, PostgreSQL mailing lists <pgsql-bugs@postgresql.org>
Subject: Re: BUG #14666: Question on money type as the key of partitioned table
Date: Sun, 28 May 2017 17:04:25 -0400
Message-ID: <30475.1496005465@sss.pgh.pa.us> (raw)
In-Reply-To: <CAB7nPqRwZ8STFAE-0jXzNqr+naOcYrN8HXKW0V21ARbTifK7ew@mail.gmail.com>
References: <20170524024550.29935.14396@wrigleys.postgresql.org>
<CAB7nPqS65UhQG34AG7KACB_kLaFSB=M1iNMSrR531CptD8AMCQ@mail.gmail.com>
<CA+HiwqEEGSwPHEkj05q+mOaVWypaf=o8v8HDsPjwCokaqyy42Q@mail.gmail.com>
<CAB7nPqRwZ8STFAE-0jXzNqr+naOcYrN8HXKW0V21ARbTifK7ew@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
Michael Paquier <michael.paquier@gmail.com> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, michael.paquier@gmail.com, amitlangote09@gmail.com
Subject: Re: BUG #14666: Question on money type as the key of partitioned table
In-Reply-To: <30475.1496005465@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox