Re: Change server encoding after the fact - Mailing list pgsql-general

From Tom Lane
Subject Re: Change server encoding after the fact
Date
Msg-id 10863.1317408321@sss.pgh.pa.us
Whole thread Raw
In response to Re: Change server encoding after the fact  (Scott Marlowe <scott.marlowe@gmail.com>)
List pgsql-general
Scott Marlowe <scott.marlowe@gmail.com> writes:
> On Fri, Sep 30, 2011 at 12:26 PM, Cody Caughlan <toolbag@gmail.com> wrote:
>> So it appears both template0 & template1 are SQL_ASCII, so how would
>> creating from a new DB from template0 be any different than template1?

> P.s. I'm not sure why it works, I just know that it does. :)

CREATE DATABASE assumes that template0 cannot contain any non-ASCII
data, so it's okay to clone it and then pretend that the result has some
other encoding.  The same assumption cannot be made for template1, since
that's user-modifiable.

            regards, tom lane

pgsql-general by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: Change server encoding after the fact
Next
From: Cody Caughlan
Date:
Subject: Re: Change server encoding after the fact