microsoft / azuredatastudio-postgresql

azuredatastudio-postgresql is an extension for Azure Data Studio that enables you to work with PostgreSQL databases
Other
196 stars 37 forks source link

Error: Failed to expand node on "Databases" directory #352

Closed mark-roberts1 closed 1 year ago

mark-roberts1 commented 1 year ago

I am running an instance of the official postgresql docker image, and using Azure Data Studio to run scripts here and there against it. This has worked until recently, when I started getting a pop up error when expanding the Databases directory: "Error: Failed to expand node"

I opened the logs for the database, and this is what I see:

2023-02-27 14:29:56.974 UTC [35] ERROR:  column db.datlastsysoid does not exist at character 106
2023-02-27 14:29:56.974 UTC [35] STATEMENT:  SELECT
            db.oid as oid, 
            db.datname as name, 
            ta.spcname as spcname, 
            db.datallowconn,
            db.datlastsysoid,
            has_database_privilege(db.oid, 'CREATE') as cancreate, 
            datdba as owner, 
            db.datistemplate , 
            has_database_privilege(db.datname, 'connect') as canconnect,
            datistemplate as is_system
        FROM
            pg_database db
            LEFT OUTER JOIN pg_tablespace ta ON db.dattablespace = ta.oid
        ORDER BY datname;

It seems like there has been a breaking change in an update to postgres or this extension since I have begun using it. Any help would be appreciated!

mark-roberts1 commented 1 year ago

Image ID: 680aba37fd0f Extension Version: v0.2.7

DaeunYim commented 1 year ago

Being tracked in https://github.com/microsoft/azuredatastudio-postgresql/issues/357. Closing the issue