> The requirement for ownership of at least one type means that the
> example you give could only be done by a superuser. 

That's correct; and superuser should be doing the right thing.


> 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.

Point taken.

Looking at [1] I wonder if there should be more emphasis on this point. The 
point
being that a user-defined cast has the ability to override the behavior of a 
cast
that can be performed implicitly.

[1] https://www.postgresql.org/docs/current/sql-createcast.html

Regards,

Sami 
Amazon Web Services (AWS)




Reply via email to