mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixes #1285 - Update the comments (description) over the tablespace
properly.
This commit is contained in:
parent
9436542074
commit
8b54b59f2b
@ -412,7 +412,7 @@ class TablespaceView(PGChildNodeView):
|
|||||||
|
|
||||||
if SQL and SQL.strip('\n') and SQL.strip(' '):
|
if SQL and SQL.strip('\n') and SQL.strip(' '):
|
||||||
return make_json_response(
|
return make_json_response(
|
||||||
data=SQL,
|
data=SQL.strip('\n'),
|
||||||
status=200
|
status=200
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -518,7 +518,7 @@ class TablespaceView(PGChildNodeView):
|
|||||||
|
|
||||||
SQL = sql_header + SQL
|
SQL = sql_header + SQL
|
||||||
|
|
||||||
return ajax_response(response=SQL)
|
return ajax_response(response=SQL.strip('\n'))
|
||||||
|
|
||||||
|
|
||||||
@check_precondition
|
@check_precondition
|
||||||
|
@ -15,7 +15,7 @@ ALTER TABLESPACE {{ conn|qtIdent(data.name) }}
|
|||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{# ==== To update tablespace comments ==== #}
|
{# ==== To update tablespace comments ==== #}
|
||||||
{% if data.description and data.description != o_data.description %}
|
{% if data.description is defined and data.description != o_data.description %}
|
||||||
COMMENT ON TABLESPACE {{ conn|qtIdent(data.name) }}
|
COMMENT ON TABLESPACE {{ conn|qtIdent(data.name) }}
|
||||||
IS {{ data.description|qtLiteral }};
|
IS {{ data.description|qtLiteral }};
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ ALTER TABLESPACE {{ conn|qtIdent(data.name) }}
|
|||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{# ==== To update tablespace comments ==== #}
|
{# ==== To update tablespace comments ==== #}
|
||||||
{% if data.description and data.description != o_data.description %}
|
{% if data.description is defined and data.description != o_data.description %}
|
||||||
COMMENT ON TABLESPACE {{ conn|qtIdent(data.name) }}
|
COMMENT ON TABLESPACE {{ conn|qtIdent(data.name) }}
|
||||||
IS {{ data.description|qtLiteral }};
|
IS {{ data.description|qtLiteral }};
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ ALTER TABLESPACE {{ conn|qtIdent(data.name) }}
|
|||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{# ==== To update tablespace comments ==== #}
|
{# ==== To update tablespace comments ==== #}
|
||||||
{% if data.description and data.description != o_data.description %}
|
{% if data.description is defined and data.description != o_data.description %}
|
||||||
COMMENT ON TABLESPACE {{ conn|qtIdent(data.name) }}
|
COMMENT ON TABLESPACE {{ conn|qtIdent(data.name) }}
|
||||||
IS {{ data.description|qtLiteral }};
|
IS {{ data.description|qtLiteral }};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user