Skip to content

Conversation

@RS2007
Copy link
Contributor

@RS2007 RS2007 commented Nov 22, 2025

Closes #3949
Closes #4018

turso> values(asdf);
  × Parse error: Unquoted identifier in VALUES clause: asdf
  
turso> select * from users;
┌────┬──────┐
│ id │ name │
├────┼──────┤
│  1 │ jack │
├────┼──────┤
│  2 │ jill │
└────┴──────┘
  turso> select id, (values(name)) as name_again from users;
┌────┬────────────┐
│ id │ name_again │
├────┼────────────┤
│  1 │ jack       │
├────┼────────────┤
│  2 │ jill       │
└────┴────────────┘

@RS2007 RS2007 requested a review from jussisaurio as a code owner November 22, 2025 04:21
@RS2007 RS2007 requested a review from penberg as a code owner November 22, 2025 04:37
@RS2007 RS2007 marked this pull request as draft November 22, 2025 05:04
@LeMikaelF
Copy link
Contributor

LeMikaelF commented Nov 22, 2025

This masks the underlying issue, which is that Turso doesn't resolve column names in values clauses, but it's an still improvement. At least now Turso will throw an error instead of silently coercing and inserting a column name to a string.

For the test failure, you could use do_execsql_test_regex with a regex alternation, and leave a comment that it's temporary behaviour.

My opinion is that we could merge this, as long as we have a Github issue to track the issue that Turso can't resolve column names in VALUES clauses.

@RS2007 RS2007 force-pushed the values_unquoted_coerce_invalid branch from 07bed19 to 5c8d56e Compare November 23, 2025 06:45
@RS2007
Copy link
Contributor Author

RS2007 commented Nov 23, 2025

This masks the underlying issue, which is that Turso doesn't resolve column names in values clauses, but it's an still improvement. At least now Turso will throw an error instead of silently coercing and inserting a column name to a string.

For the test failure, you could use do_execsql_test_regex with a regex alternation, and leave a comment that it's temporary behaviour.

My opinion is that we could merge this, as long as we have a Github issue to track the issue that Turso can't resolve column names in VALUES clauses.

The fix that I have up currently, resolves the string using the outer query table.

@RS2007 RS2007 marked this pull request as ready for review November 24, 2025 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect resolution of column names in a values clause values() should not coerce unquoted identifier to string

2 participants