Deprecate custom encoding conversions - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Deprecate custom encoding conversions
Date
Msg-id 0e837cc7-42a0-7095-9611-51ed0abb2867@iki.fi
Whole thread Raw
Responses Re: Deprecate custom encoding conversions
RE: Deprecate custom encoding conversions
Re: Deprecate custom encoding conversions
List pgsql-hackers
Hi,

PostgreSQL allows writing custom encoding conversion functions between 
any character encodings, using the CREATE CONVERSION command. It's 
pretty flexible, you can define default and non-default conversions, and 
the conversions live in schemas so you can have multiple conversions 
installed in a system and you can switch between them by changing 
search_path.

However:

We never use non-default conversions for anything. All code that 
performs encoding conversions only cares about the default ones.

I think this flexibility is kind of ridiculous anyway. If a built-in 
conversion routine doesn't handle some characters correctly, surely we 
should fix the built-in function, rather than provide a mechanism for 
having your own conversion functions. If you truly need to perform the 
conversions differently than the built-in routines do, you can always 
perform the conversion in the client instead.

Note that we don't support adding completely new custom encodings, all 
this is just for conversions between the built-in encodings that we have.

I propose that we add a notice to the CREATE CONVERSION docs to say that 
it is deprecated, and remove it in a few years.

Any objections? Anyone using custom encoding conversions in production?

- Heikki



pgsql-hackers by date:

Previous
From: Dean Rasheed
Date:
Subject: Re: Additional improvements to extended statistics
Next
From: Pavel Stehule
Date:
Subject: Re: SELECT INTO deprecation