public inbox for [email protected]
help / color / mirror / Atom feed[pgAdmin4][Patch]: Dependency tab fix
2+ messages / 2 participants
[nested] [flat]
* [pgAdmin4][Patch]: Dependency tab fix
@ 2021-02-01 12:16 Khushboo Vashi <[email protected]>
2021-02-02 07:29 ` Re: [pgAdmin4][Patch]: Dependency tab fix Akshay Joshi <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: Khushboo Vashi @ 2021-02-01 12:16 UTC (permalink / raw)
To: pgadmin-hackers
Hi,
Please find the attached patch to fix the dependency tab loading issue with
the database name having special characters like (',"" etc...)
Thanks,
Khushboo
Attachments:
[application/octet-stream] dependency_tab_fix.patch (2.2K, 3-dependency_tab_fix.patch)
download | inline diff:
diff --git a/web/pgadmin/browser/server_groups/servers/templates/depends/gpdb/5_plus/role_dependencies.sql b/web/pgadmin/browser/server_groups/servers/templates/depends/gpdb/5_plus/role_dependencies.sql
index c3a3ba29c..bd225e39f 100644
--- a/web/pgadmin/browser/server_groups/servers/templates/depends/gpdb/5_plus/role_dependencies.sql
+++ b/web/pgadmin/browser/server_groups/servers/templates/depends/gpdb/5_plus/role_dependencies.sql
@@ -3,6 +3,6 @@ FROM pg_shdepend dep
LEFT JOIN pg_roles r ON refclassid=1260 AND refobjid=r.oid
{{where_clause}}
{% if db_name %}
- AND dep.dbid = (SELECT oid FROM pg_database WHERE datname = '{{db_name}}')
+ AND dep.dbid = (SELECT oid FROM pg_database WHERE datname = {{ db_name|qtLiteral }})
{% endif %}
ORDER BY 1
diff --git a/web/pgadmin/browser/server_groups/servers/templates/depends/pg/9.1_plus/role_dependencies.sql b/web/pgadmin/browser/server_groups/servers/templates/depends/pg/9.1_plus/role_dependencies.sql
index c3a3ba29c..bd225e39f 100644
--- a/web/pgadmin/browser/server_groups/servers/templates/depends/pg/9.1_plus/role_dependencies.sql
+++ b/web/pgadmin/browser/server_groups/servers/templates/depends/pg/9.1_plus/role_dependencies.sql
@@ -3,6 +3,6 @@ FROM pg_shdepend dep
LEFT JOIN pg_roles r ON refclassid=1260 AND refobjid=r.oid
{{where_clause}}
{% if db_name %}
- AND dep.dbid = (SELECT oid FROM pg_database WHERE datname = '{{db_name}}')
+ AND dep.dbid = (SELECT oid FROM pg_database WHERE datname = {{ db_name|qtLiteral }})
{% endif %}
ORDER BY 1
diff --git a/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/9.1_plus/role_dependencies.sql b/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/9.1_plus/role_dependencies.sql
index c3a3ba29c..bd225e39f 100644
--- a/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/9.1_plus/role_dependencies.sql
+++ b/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/9.1_plus/role_dependencies.sql
@@ -3,6 +3,6 @@ FROM pg_shdepend dep
LEFT JOIN pg_roles r ON refclassid=1260 AND refobjid=r.oid
{{where_clause}}
{% if db_name %}
- AND dep.dbid = (SELECT oid FROM pg_database WHERE datname = '{{db_name}}')
+ AND dep.dbid = (SELECT oid FROM pg_database WHERE datname = {{ db_name|qtLiteral }})
{% endif %}
ORDER BY 1
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: [pgAdmin4][Patch]: Dependency tab fix
2021-02-01 12:16 [pgAdmin4][Patch]: Dependency tab fix Khushboo Vashi <[email protected]>
@ 2021-02-02 07:29 ` Akshay Joshi <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Akshay Joshi @ 2021-02-02 07:29 UTC (permalink / raw)
To: Khushboo Vashi <[email protected]>; +Cc: pgadmin-hackers
Thanks, patch applied.
On Mon, Feb 1, 2021 at 5:46 PM Khushboo Vashi <
[email protected]> wrote:
> Hi,
>
> Please find the attached patch to fix the dependency tab loading issue
> with the database name having special characters like (',"" etc...)
>
> Thanks,
> Khushboo
>
--
*Thanks & Regards*
*Akshay Joshi*
*pgAdmin Hacker | Principal Software Architect*
*EDB Postgres <http://edbpostgres.com>*
*Mobile: +91 976-788-8246*
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2021-02-02 07:29 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-02-01 12:16 [pgAdmin4][Patch]: Dependency tab fix Khushboo Vashi <[email protected]>
2021-02-02 07:29 ` Akshay Joshi <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox