• T
    Ensure that typmod decoration on a datatype name is validated in all cases, · 0bd4da23
    Tom Lane 提交于
    even in code paths where we don't pay any subsequent attention to the typmod
    value.  This seems needed in view of the fact that 8.3's generalized typmod
    support will accept a lot of bogus syntax, such as "timestamp(foo)" or
    "record(int, 42)" --- if we allow such things to pass without comment,
    users will get confused.  Per a recent example from Greg Stark.
    
    To implement this in a way that's not very vulnerable to future
    bugs-of-omission, refactor the API of parse_type.c's TypeName lookup routines
    so that typmod validation is folded into the base lookup operation.  Callers
    can still choose not to receive the encoded typmod, but we'll check the
    decoration anyway if it's present.
    0bd4da23
parse_expr.c 65.2 KB