Fixed an issue while editing char[] or character varying[] column from View/Edit data throwing an error.Fixes #4410.

This commit is contained in:
Nick Barnes 2020-01-23 14:55:02 +05:30 committed by Akshay Joshi
parent fde8e4054a
commit f5d46bf9f1
2 changed files with 2 additions and 1 deletions

View File

@ -24,6 +24,7 @@ Bug fixes
*********
| `Issue #3812 <https://redmine.postgresql.org/issues/3812>`_ - Ensure that path file name should not disappear when changing ext from the dropdown in file explorer dialog.
| `Issue #4410 <https://redmine.postgresql.org/issues/4410>`_ - Fixed an issue while editing char[] or character varying[] column from View/Edit data throwing an error.
| `Issue #4511 <https://redmine.postgresql.org/issues/4511>`_ - Fixed an issue where Grant wizard unable to handle multiple objects when the query string parameter exceeds its limit.
| `Issue #4827 <https://redmine.postgresql.org/issues/4827>`_ - Fix column resizable issue in the file explorer dialog.
| `Issue #5000 <https://redmine.postgresql.org/issues/5000>`_ - Logout the pgAdmin session when no user activity of mouse move, click or keypress.

View File

@ -538,7 +538,7 @@ def compose_type_name(col_info, typname):
if typname == 'character' or typname == 'character varying':
typname = typname + '(' + str(col_info['internal_size']) + ')'
elif typname == 'character[]' or typname == 'character varying[]':
typname = '%s(%s)[]'.format(
typname = '{}({})[]'.format(
typname[:-2],
str(col_info['internal_size'])
)