Re: Shouldn't default multibyte encoding come from template database? - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Shouldn't default multibyte encoding come from template database?
Date
Msg-id Pine.LNX.4.21.0011140725110.1116-100000@peter.localdomain
Whole thread Raw
In response to Shouldn't default multibyte encoding come from template database?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Shouldn't default multibyte encoding come from template database?
List pgsql-hackers
Tom Lane writes:

> I've got the multiple-template-database feature nearly ready to commit,
> but I was just noticing that the way we handle default MB encoding
> selection seems wrong for this way of looking at things.  Currently,
> if you don't specify "ENCODING = something" in CREATE DATABASE, the
> default is to use the encoding that applies to the database you're
> currently connected to.

How so?
               | CREATE DATABASE database_name                               {
CreatedbStmt*n = makeNode(CreatedbStmt);                                       n->dbname = $3;
            n->dbpath = NULL;                                       n->encoding = GetTemplateEncoding();
                      $$ = (Node *)n;                                }
 

Or does GetTemplateEncoding() not get the template encoding?

In any case, it should, because that's how it used to work and how it's
documented.

-- 
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: SearchSysCacheTuple(Copy)
Next
From: The Hermit Hacker
Date:
Subject: Re: FW: Returned mail: see transcript for details