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

empty list of objects on pg 10.x #496

Open marmizg opened 7 months ago

marmizg commented 7 months ago

Type: Bug

the list of objects from postgresql 10 is not visible after connecting to the server. The query sent by the add-in in Azure Studio is executed correctly on the pg server side and contains a list of databases.

image

PostgreSQL extension for Azure Data Studio Extension version: 0.6.0 Azure Data Studio version: azuredatastudio 1.47.1 (b6f7beb01f92adaa4b79b6b6f3ac704e95cafe6e, 2024-01-10T02:15:02.628Z) OS version: Windows_NT x64 10.0.22631 Restricted Mode: No Preview Features: Disabled Modes:

marmizg commented 7 months ago
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;
   oid    |    name     |  spcname   | datallowconn | datlastsysoid | cancreate | owner | datistemplate | canconnect | is_system
----------+-------------+------------+--------------+---------------+-----------+-------+---------------+------------+-----------
 11438641 | secret1     | pg_default | t            |         13020 | t         |    10 | f             | t          | f
 11454782 | secret2     | pg_default | t            |         13020 | t         |    10 | f             | t          | f
 11436428 | secret3     | pg_default | t            |         13020 | t         |    10 | f             | t          | f
  5216175 | secret4     | pg_default | t            |         13020 | t         | 16397 | f             | t          | f
    16429 | secret5     | pg_default | t            |         13020 | t         | 16399 | f             | t          | f
 11462470 | secret6     | pg_default | t            |         13020 | t         |    10 | f             | t          | f
    13021 | postgres    | pg_default | t            |         13020 | t         |    10 | f             | t          | f
    13020 | template0   | pg_default | f            |         13020 | t         |    10 | t             | t          | t
        1 | template1   | pg_default | t            |         13020 | t         |    10 | t             | t          | t
 11456720 | template2   | pg_default | t            |         13020 | t         |    10 | f             | t          | f
 11456721 | secret7     | pg_default | t            |         13020 | t         |    10 | f             | t          | f
 11436875 | secret8     | pg_default | t            |         13020 | t         |    10 | f             | t          | f
 11438389 | secret9     | pg_default | t            |         13020 | t         |    10 | f             | t          | f
 11454081 | secret10    | pg_default | t            |         13020 | t         |    10 | f             | t          | f
(14 rows)