terraware
Database
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
postgis_constraint_type
Parameters
Name
Type
Mode
geomschema
text
IN
geomtable
text
IN
geomcolumn
text
IN
Definition
SELECT replace(split_part(s.consrc, '''', 2), ')', '')::varchar FROM pg_class c, pg_namespace n, pg_attribute a , (SELECT connamespace, conrelid, conkey, pg_get_constraintdef(oid) As consrc FROM pg_constraint) AS s 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 a.attnum = ANY (s.conkey) AND s.consrc LIKE '%geometrytype(% = %';