Project

General

Profile

« Previous | Next » 

Revision 14148

bugfix: CAST (util.check_constraint_def AS util.derived_col_def): need to extract the derived column expr from the CHECK constraint expr

View differences:

trunk/schemas/util.sql
1464 1464

  
1465 1465

  
1466 1466
--
1467
-- Name: derived_col_def(check_constraint_def); Type: FUNCTION; Schema: util; Owner: -
1468
--
1469

  
1470
CREATE FUNCTION derived_col_def(check_constraint_def check_constraint_def) RETURNS derived_col_def
1471
    LANGUAGE sql IMMUTABLE
1472
    AS $$
1473
SELECT (
1474
  check_constraint_def.constraint_::util.col
1475
, util.derived_col_expr_from_check_constraint(check_constraint_def)
1476
)::util.derived_col_def
1477
$$;
1478

  
1479

  
1480
--
1467 1481
-- Name: derived_col_defs(regclass); Type: FUNCTION; Schema: util; Owner: -
1468 1482
--
1469 1483

  
......
5326 5340
-- Name: CAST (util.check_constraint_def AS util.derived_col_def); Type: CAST; Schema: pg_catalog; Owner: -
5327 5341
--
5328 5342

  
5329
CREATE CAST (util.check_constraint_def AS util.derived_col_def) WITH INOUT AS ASSIGNMENT;
5343
CREATE CAST (util.check_constraint_def AS util.derived_col_def) WITH FUNCTION util.derived_col_def(util.check_constraint_def);
5330 5344

  
5331 5345

  
5332 5346
--

Also available in: Unified diff