questdb / questdb/questdb

Add SHOW DATABASES command for consistency with SQL standards

Open
#6,816 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

New feature
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 DATABASES is 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.