Revision 14203
Added by Aaron Marcuse-Kubitza over 10 years ago
trunk/schemas/util.sql | ||
---|---|---|
1666 | 1666 |
|
1667 | 1667 |
|
1668 | 1668 |
-- |
1669 |
-- Name: derived_col_constraint_expr(derived_col_def); Type: FUNCTION; Schema: util; Owner: - |
|
1670 |
-- |
|
1671 |
|
|
1672 |
CREATE FUNCTION derived_col_constraint_expr(def derived_col_def) RETURNS text |
|
1673 |
LANGUAGE sql IMMUTABLE |
|
1674 |
AS $_$ |
|
1675 |
SELECT quote_ident((def).col.name)||$$ IS NOT DISTINCT FROM ($$||def.expr||$$)$$ |
|
1676 |
$_$; |
|
1677 |
|
|
1678 |
|
|
1679 |
-- |
|
1669 | 1680 |
-- Name: derived_col_constraints_enable(regclass); Type: FUNCTION; Schema: util; Owner: - |
1670 | 1681 |
-- |
1671 | 1682 |
|
Also available in: Unified diff
schemas/util.sql: added derived_col_constraint_expr()