pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeff Davis <pgsql@j-davis.com>
To: pgsql-bugs@postgresql.org
Subject: check_locale() and the empty string
Date: Sun, 11 Mar 2012 11:20:04 -0700
Message-ID: <1331490004.6425.20.camel@jdavis> (raw)

The following SQL succeeds:

  create database foodb with
    template = template0
    encoding = 'UTF8'
    lc_collate=''
    lc_ctype='';

(any other template fails because it actually checks for a match against
the template).

The problem seems to be in check_locale(), which just checks for a
non-NULL return value from setlocale(). However, the manual for
setlocale() says:

  If locale is "", each part of the locale that should be modified
  is set according  to  the  environment  variables.   The details
  are implementation-dependent.

Surely we don't want it to be set from the environment, right?

Regards,
	Jeff Davis




view thread (5+ messages)  latest in thread

Message-ID: <1331490004.6425.20.camel@jdavis>
Permalink:  ../1331490004.6425.20.camel@jdavis/
Also on:    postgresql.org/message-id/1331490004.6425.20.camel@jdavis

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: pgsql@j-davis.com
  Subject: Re: check_locale() and the empty string
  In-Reply-To: <1331490004.6425.20.camel@jdavis>
  References: <1331490004.6425.20.camel@jdavis>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox