Postgres VALUES syntax for temporary tables with hardcoded values
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?
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
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
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