rsgb
.public
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
postgis_constraint_srid(geomschema text, geomtable text, geomcolumn text)
Parameters
Name
Type
Mode
geomschema
text
IN
geomtable
text
IN
geomcolumn
text
IN
Definition
SELECT replace(replace(split_part(s.consrc, ' = ', 2), ')', ''), '(', '')::integer 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 '%srid(% = %';