Re: Character Encoding Question - Mailing list psycopg

From Don Parris
Subject Re: Character Encoding Question
Date
Msg-id CAJ-7yonu5w6e2vCEy2XDUaHGV0DTXNZ5rY+KnSAVDcr-2jNTLw@mail.gmail.com
Whole thread Raw
In response to Re: Character Encoding Question  (Joe Abbate <jma@freedomcircle.com>)
List psycopg
On Thu, Mar 28, 2013 at 10:42 PM, Joe Abbate <jma@freedomcircle.com> wrote:
On 28/03/13 22:07, Don Parris wrote:
> From the postgresql.conf file:
> #client_encoding = sql_ascii        # actually, defaults to database
> encoding
>
> The way I understand it, the client should default to whatever encoding
> the DB uses.  Sounds like they tried to make it difficult to do what I
> apparently did.

Yes, you're right.  However, when you do the cluster initdb, the
template0 database gets created with whatever encoding is specified to
initdb (IIRC nowadays the default is UTF-8, but in some previous version
the default used to be SQL_ASCII).  After that, any createdb that
doesn't specify an encoding defaults to the template0 encoding.  So if
your template0 has SQL_ASCII encoding, it's very easy to create a
database with that encoding.

Joe

 
Thanks Joe.  That's good to know.
 

psycopg by date:

Previous
From: Joe Abbate
Date:
Subject: Re: Character Encoding Question
Next
From: Daniele Varrazzo
Date:
Subject: Re: Character Encoding Question