Re: [HACKERS] [COMMITTERS] pgsql: Implement table partitioning.
От | Keith Fiske |
---|---|
Тема | Re: [HACKERS] [COMMITTERS] pgsql: Implement table partitioning. |
Дата | |
Msg-id | CAG1_KcD3mP6FT11C4CFhaHs6jQUvzBSoYFycbWkJi1xRpLajig@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [COMMITTERS] pgsql: Implement table partitioning. (Robert Haas <robertmhaas@gmail.com>) |
Ответы |
Re: [HACKERS] [COMMITTERS] pgsql: Implement table partitioning.
|
Список | pgsql-hackers |
On Wed, Dec 7, 2016 at 1:30 PM, Robert Haas <robertmhaas@gmail.com> wrote:
keith@keith=# CREATE TABLE measurement_y2016m07On Wed, Dec 7, 2016 at 1:20 PM, Robert Haas <rhaas@postgresql.org> wrote:
> Implement table partitioning.
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Being that table partitioning is something I'm slightly interested in, figured I'd give it a whirl.
This example in the docs has an extraneous comma after the second column
CREATE TABLE cities (
name text not null,
population int,
) PARTITION BY LIST (initcap(name));
CREATE TABLE cities (
name text not null,
population int,
) PARTITION BY LIST (initcap(name));
And the WITH OPTIONS clause does not appear to be working using another example from the docs. Not seeing any obvious typos.
keith@keith=# CREATE TABLE measurement_y2016m07
keith-# PARTITION OF measurement (
keith(# unitsales WITH OPTIONS DEFAULT 0
keith(# ) FOR VALUES FROM ('2016-07-01') TO ('2016-08-01');
2016-12-09 12:51:48.728 EST [11711] ERROR: syntax error at or near "WITH" at character 80
2016-12-09 12:51:48.728 EST [11711] STATEMENT: CREATE TABLE measurement_y2016m07
PARTITION OF measurement (
unitsales WITH OPTIONS DEFAULT 0
) FOR VALUES FROM ('2016-07-01') TO ('2016-08-01');
ERROR: syntax error at or near "WITH"
LINE 3: unitsales WITH OPTIONS DEFAULT 0
^
Time: 0.184 ms
keith@keith=# CREATE TABLE measurement_y2016m07
keith-# PARTITION OF measurement (
keith(# unitsales WITH OPTIONS DEFAULT 0
keith(# ) FOR VALUES FROM ('2016-07-01') TO ('2016-08-01');
2016-12-09 12:51:48.728 EST [11711] ERROR: syntax error at or near "WITH" at character 80
2016-12-09 12:51:48.728 EST [11711] STATEMENT: CREATE TABLE measurement_y2016m07
PARTITION OF measurement (
unitsales WITH OPTIONS DEFAULT 0
) FOR VALUES FROM ('2016-07-01') TO ('2016-08-01');
ERROR: syntax error at or near "WITH"
LINE 3: unitsales WITH OPTIONS DEFAULT 0
^
Time: 0.184 ms
Removing the unit_sales default allows it to work fine
PARTITION OF measurement
FOR VALUES FROM ('2016-07-01') TO ('2016-08-01');
CREATE TABLE
Time: 5.001 ms
В списке pgsql-hackers по дате отправления: