Closed
Description
Version
1.20.0
What happened?
Column expansion for quoted non-keyword identifier table does not work well.
input:
SELECT "t".* FROM foo "t";
output:
SELECT t.c.* FROM t "t";
expected:
SELECT t.c FROM t "t";
or
SELECT "t".c FROM t "t";
Relevant log output
No response
Database schema
CREATE TABLE t (
c BIGSERIAL PRIMARY KEY
);
SQL queries
-- name: Get :one
SELECT "t".* FROM t "t";
Configuration
{
"version": "1",
"packages": [
{
"path": "db",
"engine": "postgresql",
"schema": "query.sql",
"queries": "query.sql"
}
]
}
Playground URL
https://play.sqlc.dev/p/5532492abf710a8a93ef6fcd72236d0166347c85315ef11da8fcd3a12d67c7f9
What operating system are you using?
No response
What database engines are you using?
No response
What type of code are you generating?
No response