pggeodb.nancy.inra.fr/db_croissance - db_croissance on pggeodb.nancy.inra.fr
Previous topic Chapter index Next topic

View: geometry_columns

 

 

Schema

public

 

Owner

postgres

 

Descriptions

There is no description for view geometry_columns

 

Fields

Name

Data type

Description

f_table_catalog

varchar(256)

 

f_table_schema

name

 

f_table_name

name

 

f_geometry_column

name

 

coord_dimension

integer

 

srid

integer

 

type

varchar(30)

 

 

Rules

Name

Event

Instead

Condition

Description

_RETURN

SELECT

 

 

geometry_columns_delete

DELETE

 

 

geometry_columns_insert

INSERT

 

 

geometry_columns_update

UPDATE

 

 

 

Indices

There are no indices for table geometry_columns

 

Definition

CREATE VIEW public.geometry_columns (
   f_table_catalog,
   f_table_schema,
   f_table_name,
   f_geometry_column,
   coord_dimension,
   srid,
   type)
AS
SELECT
current_database()::character varying(256) AS f_table_catalog,
   n.nspname AS f_table_schema,
   c.relname AS f_table_name,
   a.attname AS f_geometry_column,
   COALESCE(postgis_typmod_dims(a.atttypmod), sn.ndims, 2) AS coord_dimension,
   COALESCE(NULLIF(postgis_typmod_srid(a.atttypmod), 0), sr.srid, 0) AS srid,
   replace(replace(COALESCE(NULLIF(upper(postgis_typmod_type(a.atttypmod)),
       'GEOMETRY'::text), st.type, 'GEOMETRY'::text), 'ZM'::text, ''::text), 'Z'::text, ''::text)::character varying(30) AS type
FROM
pg_class c
    JOIN pg_attribute a ON a.attrelid = c.oid AND NOT a.attisdropped
    JOIN pg_namespace n ON c.relnamespace = n.oid
    JOIN pg_type t ON a.atttypid = t.oid
    LEFT JOIN (
   SELECT s.connamespace,
           s.conrelid,
           s.conkey,
           replace(split_part(s.consrc, ''''::text, 2), ')'::text, ''::text
   ) AS type
FROM
pg_constraint s
WHERE s.consrc ~~* '%geometrytype(% = %'::text) st ON st.connamespace = n.oid
   AND st.conrelid = c.oid AND (a.attnum = ANY (st.conkey))
    LEFT JOIN (
   SELECT s.connamespace,
           s.conrelid,
           s.conkey,
           replace(split_part(s.consrc, ' = '::text, 2), ')'::text, ''::text
   )::integer AS ndims
FROM pg_constraint s
WHERE s.consrc ~~* '%ndims(% = %'::text) sn ON sn.connamespace = n.oid AND
   sn.conrelid = c.oid AND (a.attnum = ANY (sn.conkey))
    LEFT JOIN (
   SELECT s.connamespace,
           s.conrelid,
           s.conkey,
           replace(replace(split_part(s.consrc, ' = '::text, 2), ')'::text,
               ''::text), '('::text, ''::text)::integer AS srid
   FROM pg_constraint s
   WHERE s.consrc ~~* '%srid(% = %'::text) sr ON sr.connamespace = n.oid AND
       sr.conrelid = c.oid AND (a.attnum = ANY (sr.conkey))
   WHERE (c.relkind = ANY (ARRAY['r'::"char", 'v'::"char", 'm'::"char",
       'f'::"char"])) AND NOT c.relname = 'raster_columns'::name AND t.typname = 'geometry'::name AND NOT pg_is_other_temp_schema(c.relnamespace) AND has_table_privilege(c.oid, '
       SELECT'
::text
       );

CREATE RULE geometry_columns_delete AS ON DELETE TO public.geometry_columns
DO INSTEAD NOTHING;

CREATE RULE geometry_columns_insert AS ON INSERT TO public.geometry_columns
DO INSTEAD NOTHING;

CREATE RULE geometry_columns_update AS ON UPDATE TO public.geometry_columns
DO INSTEAD NOTHING;

This file was generated with SQL Manager 2011 for PostgreSQL (www.pgsqlmanager.com) at 28/03/2012 14:37
Previous topic Chapter index Next topic