Re: Why do we let CREATE DATABASE reassign encoding? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Why do we let CREATE DATABASE reassign encoding?
Date
Msg-id 2512.1240513817@sss.pgh.pa.us
Whole thread Raw
In response to Re: Why do we let CREATE DATABASE reassign encoding?  (Greg Stark <greg.stark@enterprisedb.com>)
Responses Re: Why do we let CREATE DATABASE reassign encoding?  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Greg Stark <greg.stark@enterprisedb.com> writes:
> So it would still be possible to byass this check by cloning a  
> database into SQL_ASCII and then cloning it into the desired encoding?  
> Doesn't sound like it really accomplishes much.

Well, it accomplishes preventing stupid encoding violations.  The point
came to mind when I saw a post a little bit ago on -general in which
the poster seemed to imagine that CREATE DATABASE would convert
encodings for him.  Since that is not happening in the foreseeable
future, I think we need to prevent the system from acting like it
would work.

If we wanted to be entirely anal about this, we could allow SQL_ASCII
destination with a different source encoding, but not the reverse.
However, we currently consider that you're on your own to ensure sanity
when using SQL_ASCII as far as locale goes, so I'm not sure why the
policy would be different for encoding.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: Why do we let CREATE DATABASE reassign encoding?
Next
From: Andrew Dunstan
Date:
Subject: Re: Why do we let CREATE DATABASE reassign encoding?