Allow editing of values in columns with the oid datatype which are not an actual row OID. Fixes #3418

This commit is contained in:
Dave Page
2019-02-22 16:18:39 +00:00
parent d326ddd21a
commit 27d3990ba2
2 changed files with 4 additions and 3 deletions

View File

@@ -21,6 +21,7 @@ Bug fixes
*********
| `Bug #3096 <https://redmine.postgresql.org/issues/3096>`_ - Ensure size stats are prettified on the statistics tab when the UI language is not English.
| `Bug #3418 <https://redmine.postgresql.org/issues/3418>`_ - Allow editing of values in columns with the oid datatype which are not an actual row OID.
| `Bug #3544 <https://redmine.postgresql.org/issues/3544>`_ - Make the Query Tool tab titles more concise and useful.
| `Bug #3583 <https://redmine.postgresql.org/issues/3583>`_ - Update CodeMirror to 5.43.0 to resolve issues with auto-indent.
| `Bug #3673 <https://redmine.postgresql.org/issues/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.

View File

@@ -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;