I just installed Azure Data Studio (ADS) and PostgreSQL extension. ADS connects to my Postgresql and I can do queries on my database. However, the dropdown ‘Databases’ tab does not expand. When I right click, to do Refresh, an error message shows up "Error: Failed to expand node". Would someone please help? Thank you so much in advance.
Question posted in PostgreSQL
The official documentation can be found here.
The official documentation can be found here.
3
Answers
Seems to be a known issue with ADS since pg_database.datlastsysoid field was removed in PostgreSQL 15. I am also waiting for a solution.
Azure Data Studio issue:
https://github.com/microsoft/azuredatastudio-postgresql/issues/333
Rationale for removing datlastsysoid in version 15:
https://www.postgresql.org/message-id/CA%2BTgmoa14%3DBRq0WEd0eevjEMn9EkghDB1FZEkBw7%2BUAb7tF49A%40mail.gmail.com
Followed Crocodilus’s instruction to edit the nodes query replacing line
db.datlastsysoid
with0 as datlastsysoid
worked for me. One update is adding a slash after the userprofile reference:
%USERPROFILE%.azuredatastudioextensionsmicrosoft.azuredatastudio-postgresql-0.2.7outossdbtoolsserviceWindowsv1.5.0pgsqltoolsservicelibpgsmoobjectsdatabasetemplates+defaultnodes.sql
For folks on MacOS, here’s the requisite file:
~/.azuredatastudio/extensions/microsoft.azuredatastudio-postgresql-0.2.7/out/ossdbtoolsservice/OSX/v1.5.0/pgsqltoolsservice/lib/pgsmo/objects/database/templates/+default/nodes.sql
And for completions sake, the updated contents: