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

Function: _drop_raster_constraint_spatially_unique

 

 

Schema

public

 

Owner

postgres

 

Descriptions

There is no description for function _drop_raster_constraint_spatially_unique

 

Options

Option

Value

Returns

boolean

Language

plpgsql

Parameters

rastschema name

rasttable name

rastcolumn name

 

Definition

CREATE OR REPLACE FUNCTION public._drop_raster_constraint_spatially_unique (
 rastschema name,
 rasttable name,
 rastcolumn name
)
RETURNS boolean AS
$span$
DECLARE

cn text;
BEGIN
SELECT

s.conname INTO cn
FROM pg_class c, pg_namespace n, pg_attribute a, pg_constraint s, pg_index idx, pg_operator op
WHERE n.nspname = $1
AND c.relname = $2
AND a.attname = $3
AND a.attrelid = c.oid
AND s.connamespace = n.oid
AND s.conrelid = c.oid
AND s.contype = 'x'
AND 0::smallint = ANY (s.conkey)
AND idx.indexrelid = s.conindid
AND pg_get_indexdef(idx.indexrelid, 1, true) LIKE '(' || quote_ident($3) || '::geometry)'
AND s.conexclop[1] = op.oid
AND op.oprname = '=';

RETURN _drop_raster_constraint($1, $2, cn);
END;
$span$
LANGUAGE
'plpgsql'
VOLATILE
RETURNS NULL ON NULL INPUT
SECURITY INVOKER
COST
100;

This file was generated with SQL Manager for PostgreSQL (www.pgsqlmanager.com) at 13/03/2014 13:23
Previous topic Chapter index Next topic