vscode-sqltools icon indicating copy to clipboard operation
vscode-sqltools copied to clipboard

Columns without alias show wrong results

Open artemzhdev opened this issue 7 months ago • 0 comments

Describe the bug If you have multiple columns without alias then some of them show result of neighbour column (instead of its own). See the example below.

To Reproduce Steps to reproduce the behavior:

  1. Run the following SQL script:
create temporary table tmp_table(field1 text, field2 text);
insert into tmp_table values ('test', null);
select count(*), count(field1), count(field2) from tmp_table;

Expected behavior Expect the following values: 1, 1, 0 Actual result: 1, 0, 0

Desktop (please complete the following information):

  • SQLTools Version [e.g. v0.28.4]
  • VS Code Version: using Cursor AI 0.50.5 (based on VSCode 1.96.2)
  • OS: Mac
  • Driver:
    • [x] PostgreSQL/Redshift
    • [ ] MySQL/MariaDB
    • [ ] MSSQL/Azure
    • [ ] SQLite
    • [ ] Other? Which...
  • Database version: PostgreSQL v16.6

artemzhdev avatar May 21 '25 09:05 artemzhdev