Revision 14248
Added by Aaron Marcuse-Kubitza over 10 years ago
trunk/schemas/util.sql | ||
---|---|---|
1954 | 1954 |
LANGUAGE sql |
1955 | 1955 |
AS $$ |
1956 | 1956 |
SELECT util.col_add(def); |
1957 |
SELECT util.set_comment(def.col, ' |
|
1958 |
derived column; = '||def.expr||' |
|
1957 | 1959 |
|
1960 |
to modify: |
|
1961 |
SELECT util.derived_col_update('||util.quote_typed(def)||'); |
|
1962 |
'); |
|
1963 |
|
|
1958 | 1964 |
-- if table has data, initially disabled because not yet populated |
1959 | 1965 |
SELECT util.check_constraint((def.col, util.derived_col_constraint_expr(def)), |
1960 | 1966 |
enabled := util.derived_col_constraint_initially_enabled(def)); |
Also available in: Unified diff
schemas/util.sql: derived_col_update(): add comment describing how to modify derived column