Re: Change server encoding after the fact

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
Cc: Cody Caughlan <toolbag(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Change server encoding after the fact
Date: 2011-09-30 18:45:21
Message-ID: 10863.1317408321@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> writes:
> On Fri, Sep 30, 2011 at 12:26 PM, Cody Caughlan <toolbag(at)gmail(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Cody Caughlan 2011-09-30 18:46:31 Re: Change server encoding after the fact
Previous Message Scott Marlowe 2011-09-30 18:38:30 Re: Change server encoding after the fact