Sami Imseih <samims...@gmail.com> writes:
> When a user-defined CAST is created, it has the ability to break behavior of 
> built-in
> casts that could be performed implicitly, i.e. without a cast defined in 
> pg_cast.

The requirement for ownership of at least one type means that the
example you give could only be done by a superuser.  I think there
could be an argument for requiring ownership of *both* types, but
perhaps that would break some useful cases.

> There is currently no way to prevent the usage of a user-defined cast. Should 
> there be one? 

I don't think so, and I don't see any reasonable way to do it.
You will get nowhere proposing a GUC that changes query semantics ---
we learned that that was a bad idea decades ago.

                        regards, tom lane


Reply via email to