Project

General

Profile

« Previous | Next » 

Revision 14282

bugfix: schemas/util.sql: derived_col_update(): column comment: need to use expr from DB, not as provided by user, to avoid this changing when derived_col_update() is rerun

View differences:

util.sql
1990 1990

  
1991 1991
-- once CHECK constraint exists so that we can use its canon-ed formula
1992 1992
SELECT util.set_comment(def.col, '
1993
derived column; = '||util.derived_col_expr(def.col)||'
1993
derived column; = '||def.expr||'
1994 1994

  
1995 1995
to modify expr:
1996 1996
SELECT util.derived_col_update('||util.quote_typed(def)||');
......
2000 2000
# rename column
2001 2001
# rename CHECK constraint
2002 2002
SELECT util.derived_cols_update('||util.quote_typed((def).col.table_)||');
2003
');
2003
')
2004
FROM (SELECT util.derived_col_def(def.col)/*expr from DB*/ AS def) s
2005
;
2004 2006

  
2005 2007
SELECT util.derived_cols_trigger_update((def).col.table_);
2006 2008
$$;

Also available in: Unified diff