On 5/16/18 10:14, Tom Lane wrote:
> That's about what we'd have to do, and it seems like far more
> infrastructure than the problem is worth. All you're accomplishing
> is to emit the same error at a different time, and for that you need
> a named, documented data type.
In this case, they are putting the erroneous call into a column default,
so the difference ends up being getting the error at setup time versus
at run time, which is a difference of significance. However, that kind
of manual fiddling should be rare, and it's certainly not the only way
to create run time errors from complex default expressions.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services