Re: Controlling the usage of a user-defined cast - Mailing list pgsql-hackers

From Sami Imseih
Subject Re: Controlling the usage of a user-defined cast
Date
Msg-id AA7185E8-12F2-4EB4-ADB9-5DA9C028461E@gmail.com
Whole thread Raw
In response to Re: Controlling the usage of a user-defined cast  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> 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)





pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: Proposal for Updating CRC32C with AVX-512 Algorithm.
Next
From: Peter Smith
Date:
Subject: Re: Adding a '--two-phase' option to 'pg_createsubscriber' utility.