questdb / questdb/questdb

Postgres VALUES syntax for temporary tables with hardcoded values

Open
#4,927 1 comment 6 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?

I have a query in which I would like to use a temporary table with hardcoded values. Currently, I do this like:

select
  1 as id,
  'alice' as name
union (select 2, 'bob')
union (select 3, 'eve')

I do not find this to be intuitive. It would also be nice to specify the datatypes this way.

Describe the solution you'd like.

Add some syntax similar to the Postgres VALUES:

SELECT *
FROM (
    VALUES 
        (1, 'Alice'),
        (2, 'Bob'),
        (3, 'Charlie')
) AS temp_table(id, name)
Describe alternatives you've considered.

No response

Full Name:

Peter Burger

Affiliation:

University of Innsbruck

Additional context

No response

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

No files, tests, or entry points are named in the issue. Start by locating QuestDB's SQL parsing and execution entry points for table expressions, then compare the requested PostgreSQL-style VALUES syntax with existing temporary-table behavior. Done means the shown VALUES query works with column aliases and preserves the supplied values and types.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql, sql
Domain
database
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.