From 0b82a4ad92f257a623f919e1115e911212dd77ca Mon Sep 17 00:00:00 2001 From: Aditya Toshniwal Date: Mon, 15 Jul 2019 14:55:07 +0100 Subject: [PATCH] Fix sequence reverse engineered SQL generation with quoted names on PG/EPAS 10+. Fixes #4470 --- docs/en_US/release_notes_4_11.rst | 3 ++- .../sequences/templates/sequences/sql/10_plus/get_def.sql | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/en_US/release_notes_4_11.rst b/docs/en_US/release_notes_4_11.rst index 28f821a23..46cde893a 100644 --- a/docs/en_US/release_notes_4_11.rst +++ b/docs/en_US/release_notes_4_11.rst @@ -43,4 +43,5 @@ Bug fixes | `Issue #4442 `_ - Ensure browser should not be started by Selenium when feature tests are excluded from a test run. | `Issue #4446 `_ - Use ROLE consistently when generating RE-SQL for roles, not USER. | `Issue #4450 `_ - Fix reverse engineered sql for Foreign Data Wrapper created on EPAS server in redwood mode. -| `Issue #4462 `_ - Fix some minor UI issues on IE11. \ No newline at end of file +| `Issue #4462 `_ - Fix some minor UI issues on IE11. +| `Issue #4469 `_ - Fix sequence reverse engineered SQL generation with quoted names on PG/EPAS 10+. \ No newline at end of file diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequences/sql/10_plus/get_def.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequences/sql/10_plus/get_def.sql index 9ecb461d7..91ca135d1 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequences/sql/10_plus/get_def.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequences/sql/10_plus/get_def.sql @@ -8,4 +8,4 @@ SELECT seqincrement AS increment_by, is_called FROM pg_sequence, {{ conn|qtIdent(data.schema) }}.{{ conn|qtIdent(data.name) }} -WHERE seqrelid = '{{ conn|qtIdent(data.schema) }}.{{ conn|qtIdent(data.name) }}'::regclass +WHERE seqrelid = {{data.oid}}