From 27d3990ba2fb295c3cb2ba7b0742b35c7b3faa62 Mon Sep 17 00:00:00 2001 From: Dave Page Date: Fri, 22 Feb 2019 16:18:39 +0000 Subject: [PATCH] Allow editing of values in columns with the oid datatype which are not an actual row OID. Fixes #3418 --- docs/en_US/release_notes_4_3.rst | 1 + web/pgadmin/tools/sqleditor/static/js/sqleditor.js | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/en_US/release_notes_4_3.rst b/docs/en_US/release_notes_4_3.rst index a2a9db2a9..5709c6376 100644 --- a/docs/en_US/release_notes_4_3.rst +++ b/docs/en_US/release_notes_4_3.rst @@ -21,6 +21,7 @@ Bug fixes ********* | `Bug #3096 `_ - Ensure size stats are prettified on the statistics tab when the UI language is not English. +| `Bug #3418 `_ - Allow editing of values in columns with the oid datatype which are not an actual row OID. | `Bug #3544 `_ - Make the Query Tool tab titles more concise and useful. | `Bug #3583 `_ - Update CodeMirror to 5.43.0 to resolve issues with auto-indent. | `Bug #3673 `_ - Modify the Download as CSV option to use the same connection as the Query Tool its running in so temporary tables etc. can be used. diff --git a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js index 669976fed..fd2ba623e 100644 --- a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js +++ b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js @@ -760,14 +760,14 @@ define('tools.querytool', [ options['width'] = column_size[table_name][c.name]; } // If grid is editable then add editor else make it readonly - if (c.cell == 'oid') { + if (c.cell == 'oid' && c.name == 'oid') { options['editor'] = null; } else if (c.cell == 'Json') { options['editor'] = is_editable ? Slick.Editors.JsonText : Slick.Editors.ReadOnlyJsonText; options['formatter'] = Slick.Formatters.JsonString; - } else if (c.cell == 'number' || - $.inArray(c.type, ['oid', 'xid', 'real']) !== -1 + } else if (c.cell == 'number' || c.cell == 'oid' || + $.inArray(c.type, ['xid', 'real']) !== -1 ) { options['editor'] = is_editable ? Slick.Editors.CustomNumber : Slick.Editors.ReadOnlyText;