mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed an issue where an error message is displayed when creating the new database. Fixes #7502
This commit is contained in:
committed by
Akshay Joshi
parent
23869cd61f
commit
837e3e5e83
@@ -25,14 +25,18 @@ WHERE
|
||||
db.datistemplate = {{show_user_defined_templates}} AND
|
||||
{% endif %}
|
||||
{% if did %}
|
||||
db.oid = {{ did|qtLiteral }}::OID
|
||||
db.oid = {{ did|qtLiteral }}::OID
|
||||
{% else %}
|
||||
{% if name %}
|
||||
db.datname = {{ name|qtLiteral }}::text
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if db_restrictions %}
|
||||
|
||||
{% if did %}AND{% endif %}
|
||||
db.datname in ({{db_restrictions}})
|
||||
{% elif not did%}
|
||||
db.oid > {{ last_system_oid }}::OID OR db.datname IN ('postgres', 'edb')
|
||||
{% if db_restrictions %}
|
||||
{% if did or name %}AND{% endif %}
|
||||
db.datname in ({{db_restrictions}})
|
||||
{% elif not did and not name%}
|
||||
db.oid > {{ last_system_oid }}::OID OR db.datname IN ('postgres', 'edb')
|
||||
{% endif %}
|
||||
|
||||
ORDER BY datname;
|
||||
|
||||
@@ -36,17 +36,20 @@ FROM pg_catalog.pg_database db
|
||||
LEFT OUTER JOIN pg_catalog.pg_shdescription descr ON (
|
||||
db.oid=descr.objoid AND descr.classoid='pg_database'::regclass
|
||||
)
|
||||
WHERE {% if did %}
|
||||
db.oid = {{ did|qtLiteral }}::OID
|
||||
WHERE
|
||||
{% if did %}
|
||||
db.oid = {{ did|qtLiteral }}::OID
|
||||
{% else %}
|
||||
{% if name %}
|
||||
db.datname = {{ name|qtLiteral }}::text
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if db_restrictions %}
|
||||
|
||||
{% if did %}AND{% endif %}
|
||||
db.datname in ({{db_restrictions}})
|
||||
{% elif not did%}
|
||||
db.oid > {{ last_system_oid }}::OID OR db.datname IN ('postgres', 'edb')
|
||||
{% if did or name %}AND{% endif %}
|
||||
db.datname in ({{db_restrictions}})
|
||||
{% elif not did and not name%}
|
||||
db.oid > {{ last_system_oid }}::OID OR db.datname IN ('postgres', 'edb')
|
||||
{% endif %}
|
||||
|
||||
AND db.datistemplate in (false, {{show_system_objects}})
|
||||
|
||||
ORDER BY datname;
|
||||
|
||||
@@ -13,7 +13,8 @@ db.oid = {{ did|qtLiteral }}::OID
|
||||
{% if did %}AND{% endif %}
|
||||
db.datname in ({{db_restrictions}})
|
||||
{% elif not did%}
|
||||
db.oid > {{ last_system_oid }}::OID OR db.datname IN ('postgres', 'edb')
|
||||
{% if db_restrictions %} AND {%endif%}
|
||||
db.oid > {{ last_system_oid }}::OID OR db.datname IN ('postgres', 'edb')
|
||||
{% endif %}
|
||||
|
||||
ORDER BY datname;
|
||||
|
||||
Reference in New Issue
Block a user