Skip to content

Fix #6232 - for SQL value functions, only convert them into functions if there is no column with the same name#6982

Merged
Mytherin merged 3 commits intoduckdb:masterfrom
Mytherin:columnfunctions
Apr 6, 2023
Merged

Fix #6232 - for SQL value functions, only convert them into functions if there is no column with the same name#6982
Mytherin merged 3 commits intoduckdb:masterfrom
Mytherin:columnfunctions

Conversation

@Mytherin
Copy link
Collaborator

@Mytherin Mytherin commented Apr 5, 2023

Fixes #6232

For SQL value functions - we only convert them to functions if there are no columns of the same name available, e.g.:

D CREATE TABLE users(user VARCHAR);
D INSERT INTO users VALUES ('me');
D SELECT user FROM users;
┌─────────┐
│  user   │
│ varchar │
├─────────┤
│ me      │
└─────────┘
D SELECT user;
┌─────────┐
│  user   │
│ varchar │
├─────────┤
│ duckdb  │
└─────────┘

This should prevent confusing problems like #6980.

@Mytherin Mytherin merged commit ff7a0b4 into duckdb:master Apr 6, 2023
@Mytherin Mytherin deleted the columnfunctions branch April 24, 2023 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handle Postgres' value functions (LOCALTIME, CURRENT_TIME, CURRENT_TIMESTAMP, etc) less confusingly

1 participant