mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Ensure parameter values are quoted when needed when editing roles. Fixes #4393
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
SELECT att.attnum
|
||||
FROM pg_attribute att
|
||||
WHERE att.attrelid = {{tid}}::oid
|
||||
AND att.attname = {{data.name|qtLiteral}}
|
||||
AND att.attname = {{data.name|qtLiteral(True)}}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
{% macro APPLY(conn, database, role, param, value) -%}
|
||||
ALTER {% if role %}ROLE {{ self.conn|qtIdent(role) }}{% if database %} IN DATABASE {{ conn|qtIdent(database) }}{% endif %}{% else %}DATABASE {{ conn|qtIdent(database) }}{% endif %}
|
||||
|
||||
SET {{ conn|qtIdent(param) }} TO {{ value }};
|
||||
SET {{ conn|qtIdent(param) }} TO {{ value|qtLiteral }};
|
||||
{%- endmacro %}
|
||||
{% macro RESET(conn, database, role, param) -%}
|
||||
ALTER {% if role %}ROLE {{ self.conn|qtIdent(role) }}{% if database %} IN DATABASE {{ conn|qtIdent(database) }}{% endif %}{% else %}DATABASE {{ conn|qtIdent(database) }}{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user