mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed SQL syntax error if select "Custom auto-vacuum" option and not set Autovacuum option to Yes or No. Fixes #6925
This commit is contained in:
parent
572b5a126a
commit
7468ca36ae
@ -25,6 +25,7 @@ Bug fixes
|
||||
| `Issue #6832 <https://redmine.postgresql.org/issues/6832>`_ - Ensure that internal authentication when combined with other authentication providers, the order of internal source should not matter while picking up the provider.
|
||||
| `Issue #6859 <https://redmine.postgresql.org/issues/6859>`_ - Fixed an issue where properties panel is not updated when any object is added from the browser tree.
|
||||
| `Issue #6905 <https://redmine.postgresql.org/issues/6905>`_ - Fixed an issue where database nodes are not getting loaded behind a reverse proxy with SSL.
|
||||
| `Issue #6925 <https://redmine.postgresql.org/issues/6925>`_ - Fixed SQL syntax error if select "Custom auto-vacuum" option and not set Autovacuum option to Yes or No.
|
||||
| `Issue #6939 <https://redmine.postgresql.org/issues/6939>`_ - Fixed an issue where older server group name displayed in the confirmation pop-up when the user removes server group.
|
||||
| `Issue #6940 <https://redmine.postgresql.org/issues/6940>`_ - Fixed an issue where user details are not shown when the non-admin user tries to connect to the shared server.
|
||||
| `Issue #6949 <https://redmine.postgresql.org/issues/6949>`_ - Ensure that dialog should be opened when clicking on Reassign/Drop owned menu.
|
||||
|
@ -17,7 +17,7 @@
|
||||
{% set empty_bracket = "\n(\n)"%}
|
||||
{% endif %}
|
||||
{% set with_clause = false%}
|
||||
{% if data.fillfactor or data.parallel_workers or data.toast_tuple_target or data.autovacuum_custom or data.autovacuum_enabled in ('t', 'f') or data.toast_autovacuum or data.toast_autovacuum_enabled in ('t', 'f') %}
|
||||
{% if data.fillfactor or data.parallel_workers or data.toast_tuple_target or (data.autovacuum_custom and data.add_vacuum_settings_in_sql) or data.autovacuum_enabled in ('t', 'f') or (data.toast_autovacuum and data.add_vacuum_settings_in_sql) or data.toast_autovacuum_enabled in ('t', 'f') %}
|
||||
{% set with_clause = true%}
|
||||
{% endif %}
|
||||
CREATE {% if data.relpersistence %}UNLOGGED {% endif %}TABLE{% if add_not_exists_clause %} IF NOT EXISTS{% endif %} {{conn|qtIdent(data.schema, data.name)}}{{empty_bracket}}
|
||||
|
@ -2096,8 +2096,18 @@ class BaseTableView(PGChildNodeView, BasePartitionTable, VacuumSettings):
|
||||
if data is None:
|
||||
if vacuum_key in old_data:
|
||||
for opt in old_data[vacuum_key]:
|
||||
if 'value' in opt and opt['value'] is None:
|
||||
if 'add_vacuum_settings_in_sql' not in old_data:
|
||||
old_data['add_vacuum_settings_in_sql'] = False
|
||||
|
||||
if ('value' in opt and opt['value'] is None) or \
|
||||
('value' in opt and opt['value'] == ''):
|
||||
opt.pop('value')
|
||||
|
||||
if 'value' in opt and 'add_vacuum_settings_in_sql' in \
|
||||
old_data and not \
|
||||
old_data['add_vacuum_settings_in_sql']:
|
||||
old_data['add_vacuum_settings_in_sql'] = True
|
||||
|
||||
# Iterate vacuum table
|
||||
elif vacuum_key in data and 'changed' in data[vacuum_key] \
|
||||
and vacuum_key in old_data:
|
||||
|
Loading…
Reference in New Issue
Block a user