cli: cockroach user
and other SQL CLI commands erroneously requires defaultdb to exist
#40967
Labels
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
O-community
Originated from the community
Describe the problem
"cockroach user set ...." requires the defaultdb database, but the documentation says
"The postgres and defaultdb databases can be deleted if they are not needed."
Please describe the issue you observed, and any steps we can take to reproduce it:
cockroach sql --insecure --execute="create database mydatabase;"
cockroach init --insecure --host=127.0.0.1
cockroach sql --insecure --execute="drop database IF EXISTS defaultdb;"
cockroach sql --insecure --execute="drop database IF EXISTS postgres;"
cockroach user set username --insecure
Error: pq: database "defaultdb" does not exist
Failed running "user set"
Expected behavior
user set should not need defaultdb or the documentation should be updated that defaultdb can not be deleted for insecure(?) cluster
Additional data / screenshots
Environment:
Build Tag: v19.1.3
Build Time: 2019/07/08 18:24:39
Distribution: CCL
Platform: linux amd64 (x86_64-unknown-linux-gnu)
Go Version: go1.11.6
C Compiler: gcc 6.3.0
Build SHA-1: 1a14d34
Build Type: release
The text was updated successfully, but these errors were encountered: