Project

General

Profile

« Previous | Next » 

Revision 14280

bugfix: schemas/util.sql: derived_col_expr_from_check_constraint(): need to handle strs with \n after IS DISTINCT FROM

View differences:

trunk/schemas/util.sql
1939 1939
    LANGUAGE sql IMMUTABLE
1940 1940
    AS $_$
1941 1941
-- **IMPORTANT**: need to remove the enclosing () to be consistent everywhere
1942
SELECT util.trim_parens(util.extract_str(
1943
quote_ident((check_constraint_def).constraint_.name)||$$ IS DISTINCT FROM $$,'',
1942
SELECT util.trim_parens(ltrim(util.extract_str(
1943
quote_ident((check_constraint_def).constraint_.name)||$$ IS DISTINCT FROM$$,'',
1944 1944
	util.trim_parens(util.remove_prefix($$NOT $$, util.trim_parens(
1945 1945
		util.check_constraint_expr_enable(check_constraint_def.expr)
1946 1946
	), require := true))
1947
))
1947
), E' \n'))
1948 1948
$_$;
1949 1949

  
1950 1950

  

Also available in: Unified diff