Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SHOW DATABASES shows one non-existing database #5185

Closed
pires opened this issue Dec 21, 2015 · 12 comments
Closed

SHOW DATABASES shows one non-existing database #5185

pires opened this issue Dec 21, 2015 · 12 comments

Comments

@pires
Copy link
Contributor

pires commented Dec 21, 2015

$ influx -host 192.168.99.100
Visit https://enterprise.influxdata.com to register for updates, InfluxDB server management, and monitoring.
Connected to http://192.168.99.100:8086 version 0.9.6.1
InfluxDB shell 0.9
> show databases
name: databases
---------------
name
_internal

name is a non-existing database.

Refs #5183

@otoolep
Copy link
Contributor

otoolep commented Dec 21, 2015

"Name" is the name of the column.

On Monday, December 21, 2015, Paulo Pires notifications@github.com wrote:

$ influx -host 192.168.99.100
Visit https://enterprise.influxdata.com to register for updates, InfluxDB server management, and monitoring.
Connected to http://192.168.99.100:8086 version 0.9.6.1
InfluxDB shell 0.9

show databases

name: databases

name
_internal

name is a non-existing database.

Refs #5183 #5183


Reply to this email directly or view it on GitHub
#5185.

@pires
Copy link
Contributor Author

pires commented Dec 21, 2015

We have two name identifiers there. I'm good with the label but as a user, I'm confused by the entry just above _internal.

@otoolep
Copy link
Contributor

otoolep commented Dec 21, 2015

I agree, I've never liked it either. It could do with improvement.

@pires
Copy link
Contributor Author

pires commented Dec 21, 2015

@otoolep not sure how to follow from here. Change the formatting? Split SHOW DATABASES from all other SHOW commands (which are actually queries)?

@otoolep
Copy link
Contributor

otoolep commented Dec 21, 2015

I'd need to take a look at the code. Ideally we'd implement a general solution, that would add formattting to make it clear they are column names.

@pires
Copy link
Contributor Author

pires commented Dec 21, 2015

@otoolep agreed. I have no idea if changing how the query responses are formatted would be a breaking change but am glad to own it if everyone agrees it's the correct step into fixing this.

@beckettsean
Copy link
Contributor

@pires as I clarified in another comment, the name in the return isn't the name of a database, it's the name of the column in the return. Since there's only one column returned it seems like it's part of the results.

@pires
Copy link
Contributor Author

pires commented Dec 21, 2015

@beckettsean yes I had figured it out before but want you guys to (help) decide what the solution would be here. I provided two possible ways to fix it but the one me and @otoolep (and probably everyone) agree upon may be a breaking change, even if just an aesthetic one.

@otoolep
Copy link
Contributor

otoolep commented Dec 21, 2015

Simply improving the output of the CLI such that the column names somehow are underlined would be fine a solution. It's not a breaking change since the CLI output is not part of the API.

E.g.:

> SHOW DATABASES
name: databases
---------------
name
----
_internal

@otoolep
Copy link
Contributor

otoolep commented Dec 21, 2015

Then again, perhaps this is not that clear either. :-( But you get my point.

@beckettsean
Copy link
Contributor

@otoolep I like that suggestion. I think it improves readability across the board.

@mark-rushakoff
Copy link
Contributor

It's still a little funny looking that name shows up twice but I think it's pretty clear that name isn't the name of a particular database in the current output:

> show databases
name: databases
name
----
stress
test

Closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants