Describe the bug
When writing a SELECT with a table alias and requesting completions after alias., the SQL editor suggests table names instead of column names. This happens on PostgreSQL when the table is referenced with a double-quoted identifier.
- Area: SQL editor / Monaco autocomplete
Expected behavior
Autocomplete should list columns from "AccountEventLog" (e.g. id, created_at, …).
Actual behavior
Autocomplete lists tables in the schema (Monaco kind “Table”), not columns from the aliased table.
Additional cases
The same class of bug can affect:
SELECT u. FROM public.users u (schema-qualified table + alias)
SELECT * FROM users u, orders o then o. (comma-separated FROM — second alias not parsed)
- Any
alias. where the alias was not resolved, which previously fell through to the default table suggestion list
Working case (before fix): unquoted simple tables, e.g. SELECT u. FROM users u.
Root cause
parseTablesFromQuery (src/utils/sqlAnalysis.ts) only recognized unquoted identifiers and MySQL-style backticks. It did not parse PostgreSQL double-quoted table names ("AccountEventLog").
- The parser lowercased the entire SQL string before extraction, which broke mixed-case quoted identifiers.
- When
alias. could not be resolved, registerSqlAutocomplete (src/utils/autocomplete.ts) did not return early and fell through to the generic table list branch.
To Reproduce
- Connect to a PostgreSQL database that has a mixed-case or quoted table (example:
"AccountEventLog").
- Open the SQL editor.
- Type a query such as:
SELECT ael. FROM "AccountEventLog" ael
- Trigger autocomplete immediately after
ael. (type . or invoke suggestions).
OS Version
CachyOS (Kernel 7.0.9)
Tabularis Version
v0.12.0
Relevant Log Output
Describe the bug
When writing a
SELECTwith a table alias and requesting completions afteralias., the SQL editor suggests table names instead of column names. This happens on PostgreSQL when the table is referenced with a double-quoted identifier.Expected behavior
Autocomplete should list columns from
"AccountEventLog"(e.g.id,created_at, …).Actual behavior
Autocomplete lists tables in the schema (Monaco kind “Table”), not columns from the aliased table.
Additional cases
The same class of bug can affect:
SELECT u. FROM public.users u(schema-qualified table + alias)SELECT * FROM users u, orders otheno.(comma-separatedFROM— second alias not parsed)alias.where the alias was not resolved, which previously fell through to the default table suggestion listWorking case (before fix): unquoted simple tables, e.g.
SELECT u. FROM users u.Root cause
parseTablesFromQuery(src/utils/sqlAnalysis.ts) only recognized unquoted identifiers and MySQL-style backticks. It did not parse PostgreSQL double-quoted table names ("AccountEventLog").alias.could not be resolved,registerSqlAutocomplete(src/utils/autocomplete.ts) did not return early and fell through to the generic table list branch.To Reproduce
"AccountEventLog").ael.(type.or invoke suggestions).OS Version
CachyOS (Kernel 7.0.9)
Tabularis Version
v0.12.0
Relevant Log Output