Re: [BUGS] BUG #14666: Question on money type as the key of partitioned table
| От | Tom Lane |
|---|---|
| Тема | Re: [BUGS] BUG #14666: Question on money type as the key of partitioned table |
| Дата | |
| Msg-id | 30475.1496005465@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: [BUGS] BUG #14666: Question on money type as the key ofpartitioned table (Michael Paquier <michael.paquier@gmail.com>) |
| Список | pgsql-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
В списке pgsql-bugs по дате отправления: