• Tom Lane's avatar
    Fix exprTypmod to recognize length-coercion function expressions, · 7173c485
    Tom Lane authored
    such as bpchar(char_expression, N), and pull out the attrtypmod that
    the function is coercing to.  This allows correct deduction of the
    column type in examples such as
    CREATE VIEW v AS SELECT f1::char(8) FROM tbl;
    Formerly we labeled v's column as char-of-unknown-length not char(8).
    Also, this change causes the parser not to insert a redundant length
    coercion function if the user has explicitly casted an INSERT or UPDATE
    expression to the right length.
    7173c485
parse_expr.h 780 Bytes