vscode-database-client
vscode-database-client copied to clipboard
[BUG] No export on PostgreSQL Temporary Tables
- Database type and version:
- PostgreSQL 14.10 on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit
Was happy about the free version and just bought the premium package. Then i instantly found a bug 🤣
I'm creating multiple temporary tables with postgres and then joining them to export these as csv. This example has only one, but this is still reproducable:
DROP TABLE IF EXISTS network_params_aggr_numeric;
SELECT DISTINCT
network,
value as "numeric"
INTO TEMPORARY TABLE network_params_aggr_numeric
FROM network_params
WHERE 1=1
AND network > 0 and network IN (SELECT code FROM networks)
AND param_type IN (3);
SELECT
n.code AS "code",
np.numeric AS "numeric"
FROM networks n
JOIN network_params_aggr_numeric np ON n.code = np.network
WHERE n.code > 0
Now we have two scenarios:
- Export without "Remove Pagination SQL" to Editor -> this is working ✔
- Export with "Remove Pagination SQL" to Editor -> throws an Error ❌ -> "2024-01-05 11:53:20 Cannot read properties of null (reading 'name')"
I guess the "Remove Pagination SQL" is opening a second session, so that the temporary tables are not available.
Of course I can create persistent tables and then just drop them, but that is what the temporary tables are for.
Thanks for the feedback, a new connection will be used when performing the export, I will try to fix this.
Fixed in version 6.9.10.
I just retried with 6.9.10 and still get the same error:
2024-01-11 12:56:11 Cannot read properties of null (reading 'name')
Here a screenshot of the active version:
Thanks feedback, I will check it again.
Thanks for trying to fix this so fast 👍 Keep up the good work.