]> granicus.if.org Git - postgis/commitdiff
#2842 Hide unselectable tables from raster_overview and raster_columns
authorRegina Obe <lr@pcorp.us>
Thu, 24 Sep 2015 16:15:44 +0000 (16:15 +0000)
committerRegina Obe <lr@pcorp.us>
Thu, 24 Sep 2015 16:15:44 +0000 (16:15 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@14093 b70326c6-7e19-0410-871a-916f4a2858ee

NEWS
raster/rt_pg/rtpostgis.sql.in

diff --git a/NEWS b/NEWS
index 1c452a7a686df2cb565538e05334692157837e83..dd2addb0c10dd038297dd3bfab878e1973ca6b6a 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -12,11 +12,14 @@ PostGIS 2.2.0
   - #2565, ST_SummaryStats(tablename, rastercolumn, ...) uses
            ST_SummaryStatsAgg()
   - #2567, ST_Count(tablename, rastercolumn, ...) uses ST_CountAgg()
+  - #2842, raster - Hide unselectable tables from raster_overview 
+        and raster_columns
   - By default, PostGIS raster disables all GDAL drivers affecting
     out-db rasters, ST_FromGDALRaster() and ST_AsGDALRaster() variants
   - #3181, POINT EMPTY is now stored as POINT(NaN NaN) in WKB, instead of as MULTIPOINT EMPTY
   - Java binding moved to separate repository:
     https://github.com/postgis/postgis-java
+    
 
  * Deprecated signatures *
 
index c966a9845e6118871eba918d1e0950f9dc3e3874..cff84c4eaf54dd97b83c5c7c35a37f959b03fd42 100644 (file)
@@ -8250,7 +8250,8 @@ CREATE OR REPLACE FUNCTION DropRasterConstraints (
 -- The metadata is documented in the PostGIS Raster specification:
 -- http://trac.osgeo.org/postgis/wiki/WKTRaster/SpecificationFinal01
 ------------------------------------------------------------------------------
-
+-- Availability: 2.0.0
+-- Changed: 2.2.0
 CREATE OR REPLACE VIEW raster_columns AS
        SELECT
                current_database() AS r_table_catalog,
@@ -8281,7 +8282,7 @@ CREATE OR REPLACE VIEW raster_columns AS
                AND a.attrelid = c.oid
                AND c.relnamespace = n.oid
                AND c.relkind = ANY(ARRAY['r'::char, 'v'::char, 'm'::char, 'f'::char])
-               AND NOT pg_is_other_temp_schema(c.relnamespace);
+               AND NOT pg_is_other_temp_schema(c.relnamespace)  AND has_table_privilege(c.oid, 'SELECT'::text);
 
 ------------------------------------------------------------------------------
 -- overview constraint functions
@@ -8357,7 +8358,8 @@ CREATE OR REPLACE FUNCTION _drop_overview_constraint(ovschema name, ovtable name
 ------------------------------------------------------------------------------
 -- RASTER_OVERVIEWS
 ------------------------------------------------------------------------------
-
+-- Availability: 2.0.0
+-- Changed: 2.2.0
 CREATE OR REPLACE VIEW raster_overviews AS
        SELECT
                current_database() AS o_table_catalog,
@@ -8384,7 +8386,7 @@ CREATE OR REPLACE VIEW raster_overviews AS
                AND s.connamespace = n.oid
                AND s.conrelid = c.oid
                AND s.consrc LIKE '%_overview_constraint(%'
-               AND NOT pg_is_other_temp_schema(c.relnamespace);
+               AND NOT pg_is_other_temp_schema(c.relnamespace)  AND has_table_privilege(c.oid, 'SELECT'::text);
 
 ------------------------------------------------------------------------------
 -- AddOverviewConstraints