BUG #5345: non-administrator users cannot create databases with special encoding - Mailing list pgsql-bugs

From Zoltan Kovacs
Subject BUG #5345: non-administrator users cannot create databases with special encoding
Date
Msg-id 201002241030.o1OAUMgY003857@wwwmaster.postgresql.org
Whole thread Raw
Responses Re: BUG #5345: non-administrator users cannot create databases with special encoding  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
The following bug has been logged online:

Bug reference:      5345
Logged by:          Zoltan Kovacs
Email address:      kovzol@particio.com
PostgreSQL version: 8.3.9-0lenny1
Operating system:   Debian Linux 5.0.4
Description:        non-administrator users cannot create databases with
special encoding
Details:

I would like to create a database using SQL_ASCII encoding, but it is not
allowed for a normal user, only for the postgres user.

Details (sorry, it is partially in Hungarian):

postgres=# create user wmi2user with password 'wmi2pass' createdb
nocreateuser;
CREATE ROLE
...
postgres@wmi:~$ psql -l
        Adatbázisok listája
    Név    | Tulajdonos |  Kódolás
-----------+------------+-----------
 postgres  | postgres   | UTF8
 template0 | postgres   | UTF8
 template1 | postgres   | UTF8
 wmi       | postgres   | SQL_ASCII
(4 rows)

postgres@wmi:~$ createdb -E SQL_ASCII -U wmi2user wmi2db
createdb: database creation failed: ERROR:  encoding SQL_ASCII does not
match server's locale hu_HU.UTF-8
DETAIL:  The server's LC_CTYPE setting requires encoding UTF8.

postgres@wmi:~$ createdb -E SQL_ASCII wmi2db

The last command line was successful.

Summarizing: The operation is allowed for the administrator, but not for a
normal user. But I would like to create this database by a normal user.

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #5314: Error in nested composite types in plpgsql.
Next
From: "Patrick Weimer"
Date:
Subject: Could not receive data from client: Unknown winsock error 10061