• Tom Lane's avatar
    Remove dead encoding-conversion functions. · 0ab1a2e3
    Tom Lane authored
    The code for conversions SQL_ASCII <-> MULE_INTERNAL and
    SQL_ASCII <-> UTF8 was unreachable, because we long ago changed
    the wrapper functions pg_do_encoding_conversion() et al so that
    they have hard-wired behaviors for conversions involving SQL_ASCII.
    (At least some of those fast paths date back to 2002, though it
    looks like we may not have been totally consistent about this until
    later.)  Given the lack of complaints, nobody is dissatisfied with
    this state of affairs.  Hence, let's just remove the unreachable code.
    
    Also, change CREATE CONVERSION so that it rejects attempts to
    define such conversions.  Since we consider that SQL_ASCII represents
    lack of knowledge about the encoding in use, such a conversion would
    be semantically dubious even if it were reachable.
    
    Adjust a couple of regression test cases that had randomly decided
    to rely on these conversion functions rather than any other ones.
    
    Discussion: https://postgr.es/m/41163.1559156593@sss.pgh.pa.us
    0ab1a2e3
pg_proc.dat 538 KB