Revision 14139
Added by Aaron Marcuse-Kubitza over 10 years ago
trunk/schemas/util.sql | ||
---|---|---|
870 | 870 |
|
871 | 871 |
CREATE FUNCTION check_constraint_defs(table_ regclass) RETURNS SETOF check_constraint_def |
872 | 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 |
$$; |
|
873 |
AS $_$ |
|
874 |
SELECT constraint_ FROM util.check_constraint WHERE table_ = $1 |
|
875 |
$_$; |
|
878 | 876 |
|
879 | 877 |
|
880 | 878 |
-- |
Also available in: Unified diff
schemas/util.sql: check_constraint_defs(): use new util.check_constraint view