vscode-sqltools
vscode-sqltools copied to clipboard
Remove duplicates from table columns
Hello! And thank you for great extension!
It would be great if we could see columns without duplicate rows. What I mean:

To me it looks like a made mistake in SQL or something. Would be great to see a single row for a single column
Thanks! :)
Another problem related to this is when I click "Generate insert query" it generates query with duplicates
INSERT INTO some_table (
service_id,
service_id,
)
VALUES (
'service_id:uuid',
'service_id:uuid',
);
@emil14 which driver are you using?
@mtxr I'm using "SQLTools PostgreSQL/Redshift Driver"
I'm not able to reproduce this.
Are you using extension and latest versions?

Tested on PostgreSQL 12.2 (Debian 12.2-2.pgdg100+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit

@mtxr I'm using the same versions of "SQLTools" and "PostgreSQL/Redshift Driver" on Ubuntu 18.04.5 LTS

Here's what I have :)
Hey there! Any progress?
create table if not exists users (
id serial primary key,
tg_chat_id integer unique check (tg_chat_id > 0)
);
create table if not exists assets (
id serial primary key,
name varchar(255) not null unique
);
create table if not exists accounts (
id serial primary key,
user_id integer references users(id),
name varchar(255) not null,
asset_id integer references assets(id),
unique(user_id, name)
);
create table if not exists users_accounts (
id serial primary key,
user_id integer references users(id),
account_id integer references accounts(id),
unique(user_id, account_id)
);
- SQLTools v0.28.0
- SQLTools PostgreSQL/Cockroach Driver v0.5.1
- OS: Ubuntu 22.04.2 LTS
I could fix this by myself but have no idea how this work. I know fullstack web dev thought. We can have zoom call and fix it together :)
:(
Potentially related on Stack Overflow: VSCode extension "SQL Tools" showing duplicate attributes in mysql database