Revision 14137
Added by Aaron Marcuse-Kubitza over 10 years ago
trunk/schemas/util.sql | ||
---|---|---|
865 | 865 |
|
866 | 866 |
|
867 | 867 |
-- |
868 |
-- Name: check_constraint_defs(regclass); Type: FUNCTION; Schema: util; Owner: - |
|
869 |
-- |
|
870 |
|
|
871 |
CREATE FUNCTION check_constraint_defs(table_ regclass) RETURNS SETOF check_constraint_def |
|
872 |
LANGUAGE sql IMMUTABLE |
|
873 |
AS $$ |
|
874 |
SELECT ((table_, conname), consrc)::util.check_constraint_def |
|
875 |
FROM pg_constraint |
|
876 |
WHERE conrelid = table_ AND contype = 'c' |
|
877 |
$$; |
|
878 |
|
|
879 |
|
|
880 |
-- |
|
868 | 881 |
-- Name: cluster(regclass, regclass); Type: FUNCTION; Schema: util; Owner: - |
869 | 882 |
-- |
870 | 883 |
|
Also available in: Unified diff
schemas/util.sql: added check_constraint_defs()