Skip to content

Query result from sqlite hides columns with same name #1457

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
3 tasks
izderadicka opened this issue Mar 23, 2025 · 1 comment
Open
3 tasks

Query result from sqlite hides columns with same name #1457

izderadicka opened this issue Mar 23, 2025 · 1 comment
Labels
sqlite SQLite driver triage

Comments

@izderadicka
Copy link

Describe the bug
I'm running this query against Postgres and SQLite:

select a.first_name,
    a.last_name,
    e.title,
    s.title,
    e.series_index,
    g.name
FROM author a
    join ebook_authors l on a.id = l.author_id
    JOIN ebook e on l.ebook_id = e.id
    left JOIN ebook_genres ll on e.id = ll.ebook_id
    left JOIN genre g on g.id = ll.genre_id
    left JOIN series s on s.id = e.series_id
order by e.id
limit 100;

While on results from Postgres, I see all expected columns, on result from from Sqlite one title column is missing (e.title).

When running in sqlite3 CLI also two columns are displayed (both have same name)

To Reproduce
Steps to reproduce the behavior:

  1. Create connection to Sqlite DB
  2. Run query as shown above
  3. Result - shown in table - is missing one column

Expected behavior
See both title columns - same as it works for postgress and sqlite3 CLI

Screenshots
Correct output from Postgres:

Image

Missing column in Sqlite result:

Image

All OK in sqlite3 CLI:

Image

Desktop (please complete the following information):

  • SQLTools Version 0.28.4, SQLite 0.5.2
  • VS Code Version: 1.98.2
  • OS: Linux Ubuntu 22
  • Driver:
    • [X ] PostgreSQL/Redshift
    • MySQL/MariaDB
    • MSSQL/Azure
    • [X ] SQLite
    • Other? Which...
  • Database version: Sqlite 3.37.2 2022-01-06, Postgres 15

Additional context
Add any other context about the problem here.

@gjsjohnmurray
Copy link
Collaborator

The fix for this in the PostgreSQL driver was apparently done in #485

@gjsjohnmurray gjsjohnmurray added the sqlite SQLite driver label Apr 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sqlite SQLite driver triage
Projects
None yet
Development

No branches or pull requests

2 participants