[postgis-tickets] [SCM] PostGIS branch master updated. 3.1.0rc1-210-g1cfb456
git at osgeo.org
git at osgeo.org
Tue Jun 15 02:17:33 PDT 2021
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".
The branch, master has been updated
via 1cfb456ac11a20aa361cf6816f2dd88d30651112 (commit)
from 41bf10d85882ea405e32719e53c65e576e5c63f0 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 1cfb456ac11a20aa361cf6816f2dd88d30651112
Author: Sandro Santilli <strk at kbt.io>
Date: Tue Jun 15 11:16:56 2021 +0200
FindLayer: survive lack of usage perms on some topologies
diff --git a/topology/sql/manage/FindLayer.sql.in b/topology/sql/manage/FindLayer.sql.in
index bcc88c5..f7766b8 100644
--- a/topology/sql/manage/FindLayer.sql.in
+++ b/topology/sql/manage/FindLayer.sql.in
@@ -32,9 +32,13 @@ $$ LANGUAGE 'sql';
CREATE OR REPLACE FUNCTION topology.FindLayer(layer_table regclass, feature_column name)
RETURNS topology.layer
AS $$
- SELECT * FROM topology.layer
- WHERE format('%I.%I', schema_name, table_name)::regclass = $1
- AND feature_column = $2;
+ SELECT l.*
+ FROM topology.layer l, pg_class c, pg_namespace n
+ WHERE l.schema_name = n.nspname
+ AND l.table_name = c.relname
+ AND c.oid = $1
+ AND c.relnamespace = n.oid
+ AND l.feature_column = $2
$$ LANGUAGE 'sql';
--}
-----------------------------------------------------------------------
Summary of changes:
topology/sql/manage/FindLayer.sql.in | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list