> On 12 Apr 2016, at 07:36, Arcadiy Ivanov <arcadiy@gmail.com> wrote:
>
> [
> DISTRIBUTE BY { REPLICATION | ROUNDROBIN | { [HASH | MODULO ] ( column_name ) } } |
> DISTRIBUTED { { BY ( column_name ) } | { RANDOMLY } |
> DISTSTYLE { EVEN | KEY | ALL } DISTKEY ( column_name )
> ]
> [ TO { GROUP groupname | NODE ( nodename [, ... ] ) } ]
Less invasive way to achieve same is to use WITH parameter
that already exists in CREATE TABLE, CREATE INDEX, etc.
Like that:
create table foo(id int) with(distributed_by=‘id’, nodes=’node1, node2’);
That’s easier to allow extensions to define custom parameters for WITH, than
to extend parser.
--
Stas Kelvich
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company