mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Ensure that text larger than underlying field size should not be truncated automatically. Fixes #5210
This commit is contained in:
committed by
Akshay Joshi
parent
0dd1cb3fc1
commit
c0a2f1f24d
@@ -452,9 +452,6 @@ def poll(trans_id):
|
||||
for col_type in types:
|
||||
if col_type['oid'] == col_info['type_code']:
|
||||
typname = col_type['typname']
|
||||
|
||||
typname = compose_type_name(col_info, typname)
|
||||
|
||||
col_info['type_name'] = typname
|
||||
|
||||
# Using characters %, (, ) in the argument names is not
|
||||
@@ -529,22 +526,6 @@ def poll(trans_id):
|
||||
)
|
||||
|
||||
|
||||
def compose_type_name(col_info, typname):
|
||||
# If column is of type character, character[],
|
||||
# character varying and character varying[]
|
||||
# then add internal size to it's name for the
|
||||
# correct sql query.
|
||||
if col_info['internal_size'] >= 0:
|
||||
if typname == 'character' or typname == 'character varying':
|
||||
typname = typname + '(' + str(col_info['internal_size']) + ')'
|
||||
elif typname == 'character[]' or typname == 'character varying[]':
|
||||
typname = '{}({})[]'.format(
|
||||
typname[:-2],
|
||||
str(col_info['internal_size'])
|
||||
)
|
||||
return typname
|
||||
|
||||
|
||||
@blueprint.route(
|
||||
'/fetch/<int:trans_id>', methods=["GET"], endpoint='fetch'
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user