From be4b8284c501d0833b147835aa5380cf76840d21 Mon Sep 17 00:00:00 2001 From: Akshay Joshi Date: Thu, 9 Jan 2020 18:23:23 +0530 Subject: [PATCH] Fix an issue where select, insert and update scripts on tables throwing an error. Fixes #5074. --- docs/en_US/release_notes.rst | 1 + docs/en_US/release_notes_4_18.rst | 20 +++++++++++++++++++ .../databases/schemas/tables/__init__.py | 6 +++--- 3 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 docs/en_US/release_notes_4_18.rst diff --git a/docs/en_US/release_notes.rst b/docs/en_US/release_notes.rst index 6f1106f62..e1652ad9d 100644 --- a/docs/en_US/release_notes.rst +++ b/docs/en_US/release_notes.rst @@ -11,6 +11,7 @@ notes for it. .. toctree:: :maxdepth: 1 + release_notes_4_18 release_notes_4_17 release_notes_4_16 release_notes_4_15 diff --git a/docs/en_US/release_notes_4_18.rst b/docs/en_US/release_notes_4_18.rst new file mode 100644 index 000000000..1b4be89c7 --- /dev/null +++ b/docs/en_US/release_notes_4_18.rst @@ -0,0 +1,20 @@ +************ +Version 4.18 +************ + +Release date: 2020-02-06 + +This release contains a number of bug fixes and new features since the release of pgAdmin4 4.17. + +New features +************ + + +Housekeeping +************ + + +Bug fixes +********* + +| `Issue #5074 `_ - Fix an issue where select, insert and update scripts on tables throwing an error. \ No newline at end of file diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py index f5368c36a..c384974af 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py @@ -1307,7 +1307,7 @@ class TableView(BaseTableView, DataTypeReader, VacuumSettings): # Now we have all list of columns which we need if 'columns' in data: for c in data['columns']: - columns.append(self.qtIdent(self.conn, c['attname'])) + columns.append(self.qtIdent(self.conn, c['name'])) if len(columns) > 0: columns = ", ".join(columns) @@ -1353,7 +1353,7 @@ class TableView(BaseTableView, DataTypeReader, VacuumSettings): # Now we have all list of columns which we need if 'columns' in data: for c in data['columns']: - columns.append(self.qtIdent(self.conn, c['attname'])) + columns.append(self.qtIdent(self.conn, c['name'])) values.append('?') if len(columns) > 0: @@ -1400,7 +1400,7 @@ class TableView(BaseTableView, DataTypeReader, VacuumSettings): # Now we have all list of columns which we need if 'columns' in data: for c in data['columns']: - columns.append(self.qtIdent(self.conn, c['attname'])) + columns.append(self.qtIdent(self.conn, c['name'])) if len(columns) > 0: if len(columns) == 1: