diff --git a/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js b/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js index 453453b..517d6cb 100644 --- a/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js +++ b/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js @@ -1984,8 +1984,6 @@ define( ')'; } - column_label = c.display_name + '
' + col_type; - // Identify cell type of column. switch(type) { case "json": @@ -2006,10 +2004,23 @@ define( case "boolean": col_cell = 'boolean'; break; + case "character": + case "character varying": + if (c.internal_size && c.internal_size != 65535) { + // Update column type to display length on column header + col_type += ' (' + c.internal_size + ')'; + + // Update type as well which will be useful while saving the data. + type += '(' + c.internal_size + ')' + } + col_cell = 'string'; + break; default: col_cell = 'string'; } + column_label = c.display_name + '
' + col_type; + var col = { 'name': c.name, 'label': column_label,