spqr icon indicating copy to clipboard operation
spqr copied to clipboard

Make FOR DISTRIBUTION optional when there is only one distribution

Open Denchick opened this issue 1 year ago • 0 comments

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)

Denchick avatar Feb 22 '24 15:02 Denchick