diff --git a/docs/en_US/release_notes_8_2.rst b/docs/en_US/release_notes_8_2.rst index 1b26fdc30..e8dfe6c1d 100644 --- a/docs/en_US/release_notes_8_2.rst +++ b/docs/en_US/release_notes_8_2.rst @@ -20,6 +20,7 @@ Bundled PostgreSQL Utilities New features ************ + | `Issue #2483 `_ - Administer pgAdmin Users and Preferences Using the Command Line Interface (CLI). | `Issue #5908 `_ - Allow users to convert View/Edit table into a Query tool to enable editing the SQL generated. | `Issue #7016 `_ - Added keep-alive support for SSH sessions when connecting to a PostgreSQL server via an SSH tunnel. @@ -32,4 +33,6 @@ Bug fixes | `Issue #6193 `_ - Fixed an issue where query tool title did not change after "Save As" until any new change is made. | `Issue #6781 `_ - Fixed an issue where export servers was not adding extension if not specified. + | `Issue #6815 `_ - Fixed an issue where pgAdmin imports servers to the wrong accounts for the external authentication. + | `Issue #7061 `_ - Ensure that the 'Dbo' schema is displayed as a regular schema rather than a system catalog schema. | `Issue #7070 `_ - Fixed an issue where pgAgent job schedule dialog is not opening for edit. diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/__init__.py index be78850b2..489027ae7 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/__init__.py +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/__init__.py @@ -49,9 +49,9 @@ class CatalogObjectModule(SchemaChildModule): # Flag for not to show node under Schema/Catalog node # By default its set to True to display node in schema/catalog # We do not want to display 'Catalog Objects' under Schema/Catalog - # but only in information_schema/sys/dbo + # but only in information_schema/sys CATALOG_DB_SUPPORTED = False - SUPPORTED_SCHEMAS = ['information_schema', 'sys', 'dbo'] + SUPPORTED_SCHEMAS = ['information_schema', 'sys'] def __init__(self, *args, **kwargs): """ diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collations/sql/default/backend_support.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collations/sql/default/backend_support.sql index 97bedfd7f..ba519cc70 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collations/sql/default/backend_support.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collations/sql/default/backend_support.sql @@ -1,5 +1,5 @@ SELECT - CASE WHEN nsp.nspname IN ('sys', 'dbo', 'information_schema') THEN true ELSE false END AS dbSupport + CASE WHEN nsp.nspname IN ('sys', 'information_schema') THEN true ELSE false END AS dbSupport FROM pg_catalog.pg_namespace nsp WHERE nsp.oid={{scid}}::oid AND ( diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/macros/db_catalogs.macro b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/macros/db_catalogs.macro index a1b5bbc33..48bc3403f 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/macros/db_catalogs.macro +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/macros/db_catalogs.macro @@ -1,11 +1,11 @@ {% macro VALID_CATALOGS(server_type) -%} AND n.nspname NOT LIKE 'pg\_%' {% if server_type == 'ppas' %} -AND n.nspname NOT IN ('information_schema', 'pgagent', 'dbo', 'sys') {% else %} +AND n.nspname NOT IN ('information_schema', 'pgagent', 'sys') {% else %} AND n.nspname NOT IN ('information_schema') {% endif %} {%- endmacro %} {### Below macro is used in types fetching sql ###} {% macro VALID_TYPE_CATALOGS(server_type) -%} {% if server_type == 'ppas' %} - AND nsp.nspname NOT IN ('information_schema', 'pgagent', 'dbo', 'sys') {% else %} + AND nsp.nspname NOT IN ('information_schema', 'pgagent', 'sys') {% else %} AND nsp.nspname NOT IN ('information_schema') {% endif %} {%- endmacro %} diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequences/sql/default/backend_support.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequences/sql/default/backend_support.sql index bf6c4b9e4..f72e3774e 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequences/sql/default/backend_support.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequences/sql/default/backend_support.sql @@ -1,5 +1,5 @@ SELECT - CASE WHEN nsp.nspname IN ('sys', 'dbo', 'information_schema') THEN true ELSE false END AS dbSupport + CASE WHEN nsp.nspname IN ('sys', 'information_schema') THEN true ELSE false END AS dbSupport FROM pg_catalog.pg_namespace nsp WHERE nsp.oid={{scid}}::oid AND ( (nspname = 'pg_catalog' AND EXISTS diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/static/js/synonym.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/static/js/synonym.js index 1e3657781..64089f84d 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/static/js/synonym.js +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/static/js/synonym.js @@ -82,7 +82,7 @@ define('pgadmin.node.synonym', [ }), synobjschema: ()=>getNodeListByName('schema', treeNodeInfo, itemNodeData, {}, (m)=>{ // Exclude PPAS catalogs - let exclude_catalogs = ['pg_catalog', 'sys', 'dbo', 'pgagent', 'information_schema', 'dbms_job_procedure']; + let exclude_catalogs = ['pg_catalog', 'sys', 'pgagent', 'information_schema', 'dbms_job_procedure']; return m && _.indexOf(exclude_catalogs, m.label) == -1; }), getTargetObjectOptions: (targettype, synobjschema) => diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/backend_support.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/backend_support.sql index 19eff1a50..7c0f3642d 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/backend_support.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/backend_support.sql @@ -1,5 +1,5 @@ SELECT - CASE WHEN nsp.nspname IN ('sys', 'dbo', 'information_schema') THEN true ELSE false END AS dbSupport + CASE WHEN nsp.nspname IN ('sys', 'information_schema') THEN true ELSE false END AS dbSupport FROM pg_catalog.pg_namespace nsp WHERE nsp.oid={{scid}}::oid AND ( diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/macros/db_catalogs.macro b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/macros/db_catalogs.macro index 2ea4c7669..02b2718c5 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/macros/db_catalogs.macro +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/macros/db_catalogs.macro @@ -1,5 +1,5 @@ {% macro VALID_CATALOGS(server_type) -%} AND n.nspname NOT LIKE 'pg\_%' {% if server_type == 'ppas' %} -AND n.nspname NOT IN ('information_schema', 'pgagent', 'dbo', 'sys') {% else %} +AND n.nspname NOT IN ('information_schema', 'pgagent', 'sys') {% else %} AND n.nspname NOT IN ('information_schema') {% endif %} {%- endmacro %} diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/ppas/macros/catalogs.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/ppas/macros/catalogs.sql index 29925e35b..b3568a2fb 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/ppas/macros/catalogs.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/ppas/macros/catalogs.sql @@ -8,20 +8,19 @@ ({{ tbl }}.nspname = 'information_schema' AND EXISTS (SELECT 1 FROM pg_catalog.pg_class WHERE relname = 'tables' AND relnamespace = {{ tbl }}.oid LIMIT 1)) OR - ({{ tbl }}.nspname = 'dbo' OR {{ tbl }}.nspname = 'sys') OR + ({{ tbl }}.nspname = 'sys') OR ({{ tbl }}.nspname = 'dbms_job_procedure' AND EXISTS (SELECT 1 FROM pg_catalog.pg_proc WHERE pronamespace = {{ tbl }}.oid and proname = 'run_job' LIMIT 1)) {%- endmacro %} {% macro IS_CATALOG_SCHEMA(schema_col_name) -%} - {{ schema_col_name }} IN ('pg_catalog', 'pgagent', 'information_schema', 'dbo', 'sys', 'dbms_job_procedure') + {{ schema_col_name }} IN ('pg_catalog', 'pgagent', 'information_schema', 'sys', 'dbms_job_procedure') {%- endmacro %} {% macro LABELS(tbl, _) -%} CASE {{ tbl }}.nspname WHEN 'pg_catalog' THEN '{{ _( 'PostgreSQL Catalog' ) }} (pg_catalog)' WHEN 'pgagent' THEN '{{ _( 'pgAgent Job Scheduler' ) }} (pgagent)' WHEN 'information_schema' THEN '{{ _( 'ANSI' ) }} (information_schema)' - WHEN 'dbo' THEN 'Redmond (dbo)' WHEN 'sys' THEN 'Redwood (sys)' ELSE {{ tbl }}.nspname END AS name @@ -31,20 +30,19 @@ WHEN 'pg_catalog' THEN '{{ _( 'PostgreSQL Catalog' ) }} (pg_catalog)' WHEN 'pgagent' THEN '{{ _( 'pgAgent Job Scheduler' ) }} (pgagent)' WHEN 'information_schema' THEN '{{ _( 'ANSI' ) }} (information_schema)' - WHEN 'dbo' THEN 'Redmond (dbo)' WHEN 'sys' THEN 'Redwood (sys)' ELSE {{ schema_col_name }} END {%- endmacro %} {% macro DB_SUPPORT(tbl, schema_col_name) -%} CASE - WHEN {{ tbl }}.nspname = ANY('{information_schema,sys,dbo}') + WHEN {{ tbl }}.nspname = ANY('{information_schema,sys}') THEN false ELSE true END {%- endmacro %} {% macro DB_SUPPORT_SCHEMACOL(schema_col_name) -%} CASE - WHEN {{ schema_col_name }} = ANY('{information_schema,sys,dbo}') + WHEN {{ schema_col_name }} = ANY('{information_schema,sys}') THEN false ELSE true END {%- endmacro %} diff --git a/web/pgadmin/tools/search_objects/static/js/SearchObjects.jsx b/web/pgadmin/tools/search_objects/static/js/SearchObjects.jsx index 23bd86d84..5a597617f 100644 --- a/web/pgadmin/tools/search_objects/static/js/SearchObjects.jsx +++ b/web/pgadmin/tools/search_objects/static/js/SearchObjects.jsx @@ -175,14 +175,14 @@ const getCollNode = (node_type)=> { * Sample path required by tree locator * Normal object - server_group/1.server/3.coll-database/3.database/13258.coll-schema/13258.schema/2200.coll-table/2200.table/41773 * pg_catalog schema - server_group/1.server/3.coll-database/3.database/13258.coll-catalog/13258.catalog/11.coll-table/11.table/2600 - * Information Schema, dbo, sys: + * Information Schema, sys: * server_group/1.server/3.coll-database/3.database/13258.coll-catalog/13258.catalog/12967.coll-catalog_object/12967.catalog_object/13204 * server_group/1.server/11.coll-database/11.database/13258.coll-catalog/13258.catalog/12967.coll-catalog_object/12967.catalog_object/12997.coll-catalog_object_column/12997.catalog_object_column/13 * * Column catalog_level has values as * N - Not a catalog schema * D - Catalog schema with DB support - pg_catalog - * O - Catalog schema with object support only - info schema, dbo, sys + * O - Catalog schema with object support only - info schema, sys */ const translateSearchObjectsPath = (nodeData, path, catalog_level)=> { if (path === null) { diff --git a/web/pgadmin/tools/search_objects/utils.py b/web/pgadmin/tools/search_objects/utils.py index 261051c37..039f9d9b2 100644 --- a/web/pgadmin/tools/search_objects/utils.py +++ b/web/pgadmin/tools/search_objects/utils.py @@ -124,7 +124,7 @@ class SearchObjectsHelper: # Column catalog_level has values as # N - Not a catalog schema # D - Catalog schema with DB support - pg_catalog - # O - Catalog schema with object support only - info schema, dbo, sys + # O - Catalog schema with object support only - info schema, sys status, res = conn.execute_dict( self.get_sql('search.sql', search_text=text.lower(), obj_type=obj_type,