spqr
spqr copied to clipboard
Make FOR DISTRIBUTION optional when there is only one distribution
I've been thinking for a long time what I did wrong.
spqr-console=> CREATE KEY RANGE krid1 FROM 0 ROUTE TO stockdb-test-shard1;
ERROR: syntax error
But I have only one distribution. Could you please decide for yourself where to create a key range, when there are no other distributions exist? It is a super popular scenario.
P.S. this works
spqr-console=> CREATE KEY RANGE krid2 FROM 1073741823 ROUTE TO stockdb-test-shard2 FOR DISTRIBUTION stockdb;
add key range
---------------------------------------
created key range with bound 1073741823
(1 row)