[postgis-devel] [PostGIS] #1319: [raster] Make raster_columns a view and AddRasterColumn enforce more
PostGIS
trac at osgeo.org
Wed Nov 23 10:49:18 PST 2011
#1319: [raster] Make raster_columns a view and AddRasterColumn enforce more
----------------------------+-----------------------------------------------
Reporter: robe | Owner: robe
Type: task | Status: new
Priority: high | Milestone: PostGIS 2.0.0
Component: postgis raster | Version: trunk
Keywords: |
----------------------------+-----------------------------------------------
Comment(by dustymugs):
Basic raster_columns view. Will need to add constraint checking functions
to check for scalex, scaley and bandtype.
{{{
CREATE OR REPLACE VIEW v_raster_columns AS
SELECT
current_database()::character varying(256) AS
r_table_catalog,
n.nspname::character varying(256) AS r_table_schema,
c.relname::character varying(256) AS r_table_name,
a.attname::character varying(256) AS r_raster_column,
COALESCE(postgis_constraint_srid(n.nspname::text,
c.relname::text, a.attname::text), (SELECT ST_SRID('POINT(0
0)'::geometry))) AS srid,
-- scalex double precision
-- scaley double precision
-- bandtype[] text[]
FROM
pg_class c,
pg_attribute a,
pg_type t,
pg_namespace n
WHERE t.typname = 'raster'::name
AND a.attisdropped = false
AND a.atttypid = t.oid
AND a.attrelid = c.oid
AND c.relnamespace = n.oid
AND (c.relkind = 'r'::"char" OR c.relkind = 'v'::"char")
AND NOT pg_is_other_temp_schema(c.relnamespace);
}}}
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1319#comment:7>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-devel
mailing list