Ensure that Constraint Trigger, Deferrable, Deferred option should be disabled when the user selects EDB-SPL function for the trigger. Fixes #4957

This commit is contained in:
Khushboo Vashi
2020-04-16 12:38:20 +05:30
committed by Akshay Joshi
parent c41da41efe
commit 738c421edf
2 changed files with 7 additions and 1 deletions

View File

@@ -38,6 +38,7 @@ Bug fixes
| `Issue #4858 <https://redmine.postgresql.org/issues/4858>`_ - Fixed python exception error when user tries to download the CSV and there is a connection issue.
| `Issue #4864 <https://redmine.postgresql.org/issues/4864>`_ - Make the configuration window in runtime to auto-resize.
| `Issue #4873 <https://redmine.postgresql.org/issues/4873>`_ - Fixed an issue when changing the comments of the procedure with arguments gives error in case of overloading.
| `Issue #4957 <https://redmine.postgresql.org/issues/4957>`_ - Ensure that Constraint Trigger, Deferrable, Deferred option should be disabled when the user selects EDB-SPL function for the trigger.
| `Issue #4969 <https://redmine.postgresql.org/issues/4969>`_ - Fixed an issue where changing the values of columns with JSONB or JSON types to NULL.
| `Issue #5007 <https://redmine.postgresql.org/issues/5007>`_ - Ensure index dropdown should have existing indexes while creating unique constraints.
| `Issue #5053 <https://redmine.postgresql.org/issues/5053>`_ - Fixed an issue where changing the columns in the existing view throws an error.

View File

@@ -248,12 +248,17 @@ define('pgadmin.node.trigger', [
type: 'switch',
mode: ['create','edit', 'properties'],
group: gettext('Definition'),
deps: ['tfunction'],
disabled: function(m) {
// Disabled if table is a partitioned table.
var tfunction = m.get('tfunction');
if ((_.has(m, 'node_info') && _.has(m.node_info, 'table') &&
_.has(m.node_info.table, 'is_partitioned') &&
m.node_info.table.is_partitioned) ||
_.indexOf(Object.keys(m.node_info), 'view') != -1) {
_.indexOf(Object.keys(m.node_info), 'view') != -1 ||
(m.node_info.server.server_type === 'ppas' &&
!_.isUndefined(tfunction) &&
tfunction === 'Inline EDB-SPL')) {
setTimeout(function(){
m.set('is_constraint_trigger', false);
},10);