Revision 14168
Added by Aaron Marcuse-Kubitza over 10 years ago
trunk/schemas/util.sql | ||
---|---|---|
1596 | 1596 |
CREATE FUNCTION derived_col_def(col col) RETURNS derived_col_def |
1597 | 1597 |
LANGUAGE sql IMMUTABLE |
1598 | 1598 |
AS $$ |
1599 |
SELECT constraint_::util.derived_col_def |
|
1600 |
FROM util.check_constraint |
|
1601 |
WHERE table_ = col.table_ AND name = col.name |
|
1599 |
SELECT util.check_constraint_def(col)::util.derived_col_def |
|
1602 | 1600 |
$$; |
1603 | 1601 |
|
1604 | 1602 |
|
Also available in: Unified diff
schemas/util.sql: derived_col_def(col): use existing util.check_constraint_def()