Re: types reliant on encodings [was Re: Dubious usage of TYPCATEGORY_STRING]

Peter Eisentraut <peter.eisentraut@enterprisedb.com>

From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: Chapman Flack <chap@anastigmatix.net>, Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@lists.postgresql.org
Date: 2021-12-07T15:52:42Z
Lists: pgsql-hackers
On 03.12.21 19:42, Chapman Flack wrote:
> Is there any way to find out, from the catalogs or in any automatable way,
> which types are implemented with a dependence on the database encoding
> (or on some encoding)?

What is this needed for?  C code can internally do whatever it wants, 
and the database encoding is effectively a constant, so there is no need 
for server-side code to be very much concerned about whether types do this.

Also, "types" is perhaps the wrong subject here.  Types only contain 
input and output functions and a few more bits.  Additional functions 
operating on the type could look at the server encoding without the type 
and its core functions knowing about it.




Commits

  1. Create a new type category for "internal use" types.