Add SHOW DATABASES command for consistency with SQL standards
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 17.3k
- Forks
- 1.6k
- Avg merge
- 5d 10h
- Merged PRs (30d)
- 28
Description
Is your feature request related to a problem?
Description:
QuestDB currently supports SHOW TABLES but lacks SHOW DATABASES. This creates inconsistency with standard SQL implementations and can confuse developers coming from other database systems.
Problem:
When working with QuestDB, users have no SQL command to list available databases or confirm which database context they're in. This is particularly confusing for:
- New users exploring the system
- Developers familiar with PostgreSQL/MySQL where
SHOW DATABASESis standard - Tools/clients that expect this command for database discovery
Expected Behavior:
SHOW DATABASES;
-- Should return a list of available databases
Use Case:
Helps users navigating multi-database setups
Standard SQL command expected by developers migrating from PostgreSQL/MySQL
Improves PostgreSQL wire protocol compatibility
Better integration with database management tools
---
### Describe the solution you'd like.
Implement a `SHOW DATABASES` command that returns a result set similar to `SHOW TABLES`.
**Proposed Implementation:**
```sql
SHOW DATABASES;
### Describe alternatives you've considered.
```markdown
**Current Workarounds:**
1. **Check configuration files** - Users must manually inspect `server.conf` or documentation
- Issue: Not accessible via SQL, requires file system access
2. **Assume default database** - Users work with the default `questdb` database without confirmation
- Issue: Error-prone, no validation
3. **Use PostgreSQL metadata queries** - Try `SELECT * FROM pg_database`
- Issue: May not be fully implemented in QuestDB
**Why `SHOW DATABASES` is better:**
- Native SQL command
- Consistent with existing `SHOW TABLES` pattern
- Discoverable and self-documenting
- Works in any SQL client
### Full Name:
Sandeep Kumar
### Affiliation:
Independent Developer
### Additional context
**Similar implementations:**
MySQL:
```sql
SHOW DATABASES;
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the existing SHOW TABLES command and the metadata exposed for databases, then review how server.conf and pg_database relate to the requested behavior. Define the result set and database-context semantics, implement SHOW DATABASES, and verify it through a SQL client against single- and multi-database setups.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, sql
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100