Subject: [pgadmin4][patch] Correct issue on external tables

From: Joao De Almeida Pereira <[email-masked]>
Date: Tue, 19 Jun 2018 16:16:51 -0400

Hi Hackers,

You can find attached a patch that corrects the RM #3431.

When trying to retrieve the DDL of an external table and exceptions was
being raised.

Thanks
Joao
diff --git a/web/pgadmin/browser/server_groups/servers/databases/external_tables/templates/sql/gpdb_5.0_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/external_tables/templates/sql/gpdb_5.0_plus/create.sql
index a7f64a5f..25ebf96c 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/external_tables/templates/sql/gpdb_5.0_plus/create.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/external_tables/templates/sql/gpdb_5.0_plus/create.sql
@@ -48,7 +48,7 @@ OPTIONS (
 )
 {% endif %}
 ENCODING '{{ table.pgEncodingToChar }}'
-{% if table.rejectLimit and table.rejectLimit|length > 0 %}
+{% if table.rejectLimit and table.rejectLimit > 0 %}
 {%   if table.errorTableName and table.errorTableName|length > 0 %}
 LOG ERRORS {% endif %}SEGMENT REJECT LIMIT {{ table.rejectLimit }} {{ rejectionLimit }}
 {% endif %}

---

From: Dave Page <[email-masked]>
Date: Wed, 20 Jun 2018 01:01:58 +0100

Thanks, patch applied.

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company