Default encoding for new databases

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Default encoding for new databases

Peter Eisentraut-2
pgadmin3 proposes UTF8 as the default for new databases.  While this is
undoubtedly a contribution to world peace, it's also an invitation to
create broken databases.  The default encoding should be the encoding
of template1 (or alternatively the template database chosen by the
user) so that it matches the initialized locale.  This is how the
command line works.  Other combinations will lead to databases with
unusable sorting behavior.  Please correct that.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster
Reply | Threaded
Open this post in threaded view
|

Re: Default encoding for new databases

Dave Page
 

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of
> Peter Eisentraut
> Sent: 08 December 2005 23:04
> To: [hidden email]
> Subject: [pgadmin-hackers] Default encoding for new databases
>
> pgadmin3 proposes UTF8 as the default for new databases.  
> While this is
> undoubtedly a contribution to world peace, it's also an invitation to
> create broken databases.  The default encoding should be the encoding
> of template1 (or alternatively the template database chosen by the
> user) so that it matches the initialized locale.  This is how the
> command line works.  Other combinations will lead to databases with
> unusable sorting behavior.  Please correct that.

Thanks, fixed (though I used template0 to get the default as it's less
likely to get dropped and possibly recreated in a different encoding).

Regards, Dave.

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match