On 2019-Sep-13, Amit Kapila wrote: > On Fri, Sep 13, 2019 at 1:50 PM Fabien COELHO <coe...@cri.ensmp.fr> wrote: > > >>> Is there a reason why we treat "partitions = 0" as a valid value? > > >> > > >> Yes. It is an explicit "do not create partitioned tables", which differ > > >> from 1 which says "create a partitionned table with just one partition". > > > > > > Why would anyone want to use --partitions option in the first case > > > ("do not create partitioned tables")? > > > > Having an explicit value for the default is generally a good idea, eg for > > a script to tests various partitioning settings: > > > > for nparts in 0 1 2 3 4 5 6 7 8 9 ; do > > pgbench -i --partitions=$nparts ... ; > > ... > > done > > > > Otherwise you would need significant kludging to add/remove the option. > > Allowing 0 does not harm anyone. > > > > Now if the consensus is to remove an explicit 0, it is simple enough to > > change it, but my opinion is that it is better to have it. > > Fair enough, let us see if anyone else wants to weigh in.
It seems convenient UI -- I vote to keep it. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services