Fix an issue where varchar column sizes are not visible in query tool data grid. #6281

pull/6293/head
Khushboo Vashi 2023-05-17 12:10:43 +05:30 committed by GitHub
parent 6c7f5d1a6b
commit c0c9034326
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 2 deletions

View File

@ -961,6 +961,7 @@ def poll(trans_id):
col_type['type_code'] = col['type_code']
col_type['type_name'] = None
col_type['internal_size'] = col['internal_size']
col_type['display_size'] = col['display_size']
columns[col['name']] = col_type
if columns:

View File

@ -492,9 +492,9 @@ export class ResultSetUtils {
case '"char"[]':
case 'character varying':
case 'character varying[]':
if (c.internal_size && c.internal_size >= 0 && c.internal_size != 65535) {
if (c.display_size && c.display_size >= 0 && c.display_size != 65535) {
// Update column type to display length on column header
columnType += ' (' + c.internal_size + ')';
columnType += ' (' + c.display_size + ')';
}
cellType = 'string';
break;

View File

@ -39,6 +39,7 @@ def get_columns_types(is_query_tool, columns_info, table_oid, conn, has_oids):
col_type['type_code'] = col['type_code']
col_type['type_name'] = None
col_type['internal_size'] = col['internal_size']
col_type['display_size'] = col['display_size']
column_types[col['name']] = col_type
if not is_query_tool: