Closed bangroot closed 1 year ago
Cross-referenced to https://github.com/mtxr/vscode-sqltools/issues/920#issuecomment-1241439519
Also happens if you set "sqltools.results.reuseTabs": "connection"
and run a new query.
Seems like it has to do with the number of columns in the result set; if it changes you get the error.
@leonid-shevtsov thanks for the clue.
@mtxr I can repro it in the test workspace by creating the contacts table and then running this pair of queries together:
SELECT first_name FROM contacts;
SELECT first_name, last_name FROM contacts;
The result tab appears with two sub-tabs. When I switch to the second sub-tab the error gets reported there.
Initially I couldn't get breakpoints in .tsx files to bind. I fixed that by adding this to the "Launch SQLTools" configuration in launch.json
"debugWebviews": true,
The error no longer happens after I comment out this code:
But then after I switch to the second sub-tab and resize one of the columns the crash occurs.
I don't know enough about the TSX stuff that's used for this webview, so I haven't been able to get any further. But it feels like something is getting called to manipulate two columns before the previous one-column table has been replaced by the new two-column table.
Different numbers of columns don't seem to be required. I also get it from this:
select 1 from contacts;
select 2 from contacts;
But not from this:
select 1 from contacts;
select 2 as '1' from contacts;
Same here with Postgresql. If you check the reuse tab setting, it just fails when changing the query.
@mtxr when you have some time please investigate this issue.
Version 0.27.0 should resolve this.
When I run multiple queries in a
@block
against postgres, if I try to change tabs in the output window, I get the following error:Desktop (please complete the following information):
Additional context Add any other context about the problem here.