From d007eb85cbc882e6d2bb8d79ccedaa1237c59464 Mon Sep 17 00:00:00 2001 From: "Jorge S. Mendes de Jesus" Date: Tue, 25 Feb 2020 08:56:06 +0100 Subject: [PATCH] Revert "distinct records on database" This reverts commit 3caf4a92a4b888af0313d94dcef623a198bc1c1f. modified: pygeoapi/provider/postgresql.py --- pygeoapi/provider/postgresql.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pygeoapi/provider/postgresql.py b/pygeoapi/provider/postgresql.py index 5937b7c..564255d 100644 --- a/pygeoapi/provider/postgresql.py +++ b/pygeoapi/provider/postgresql.py @@ -252,7 +252,7 @@ class PostgreSQLProvider(BaseProvider): properties=properties, bbox=bbox) sql_query = SQL("DECLARE \"geo_cursor\" CURSOR FOR \ - SELECT DISTINCT {},ST_AsGeoJSON({}) FROM {}{}").\ + SELECT {},ST_AsGeoJSON({}) FROM {}{}").\ format(db.columns, Identifier(self.geom), Identifier(self.table), @@ -337,8 +337,8 @@ class PostgreSQLProvider(BaseProvider): with DatabaseConnection(self.conn_dic, self.table) as db: cursor = db.conn.cursor(cursor_factory=RealDictCursor) - sql_query = SQL("SELECT {},ST_AsGeoJSON({}) \ - FROM {} WHERE {}=%s").format(db.columns, + sql_query = SQL("select {},ST_AsGeoJSON({}) \ + from {} WHERE {}=%s").format(db.columns, Identifier(self.geom), Identifier(self.table), Identifier(self.id_field))