diff --git a/docs/en_US/release_notes_4_22.rst b/docs/en_US/release_notes_4_22.rst index 4bc34e2c4..7d18e077d 100644 --- a/docs/en_US/release_notes_4_22.rst +++ b/docs/en_US/release_notes_4_22.rst @@ -22,6 +22,7 @@ Bug fixes | `Issue #3694 `_ - Gracefully informed the user that the database is already connected when they click on "Connect Database...". | `Issue #4279 `_ - Ensure that file browse "home" button should point to $HOME rather than /. +| `Issue #4840 `_ - Ensure that 'With OID' option should be disabled while taking backup of database server version 12 and above. | `Issue #5422 `_ - Ensure that the dependencies tab shows correct information for Synonyms. | `Issue #5440 `_ - Fixed list sorting issue in the schema diff tool. | `Issue #5449 `_ - Fixed an issue while comparing the two identical schemas using the schema diff tool. diff --git a/web/pgadmin/tools/backup/static/js/backup.js b/web/pgadmin/tools/backup/static/js/backup.js index 96f88cdf2..28f435fed 100644 --- a/web/pgadmin/tools/backup/static/js/backup.js +++ b/web/pgadmin/tools/backup/static/js/backup.js @@ -516,6 +516,14 @@ define([ deps: ['use_column_inserts', 'use_insert_commands'], group: gettext('Miscellaneous'), disabled: function(m) { + var t = pgBrowser.tree, + i = t.selected(), + d = i && i.length == 1 ? t.itemData(i) : undefined, + s = pgBrowser.Nodes[d._type].getTreeNodeHierarchy(i)['server']; + + if (s.version >= 120000) + return true; + if (m.get('use_column_inserts') || m.get('use_insert_commands')) { setTimeout(function() { m.set('with_oids', false); }, 10); return true;