Re: types reliant on encodings [was Re: Dubious usage of TYPCATEGORY_STRING] - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: types reliant on encodings [was Re: Dubious usage of TYPCATEGORY_STRING]
Date
Msg-id e0632341-8e71-b4ca-330c-955f3bf66b26@enterprisedb.com
Whole thread Raw
In response to types reliant on encodings [was Re: Dubious usage of TYPCATEGORY_STRING]  (Chapman Flack <chap@anastigmatix.net>)
List 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.




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Dubious usage of TYPCATEGORY_STRING
Next
From: Anton Voloshin
Date:
Subject: Re: Triage for unimplemented geometric operators