pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: vinod.t.v@outlook.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15509: Pg_Dump failed if Database name contains non ascii characters
Date: Fri, 16 Nov 2018 00:22:27 -0500
Message-ID: <20144.1542345747@sss.pgh.pa.us> (raw)
In-Reply-To: <15509-59ca9b34c6573944@postgresql.org>
References: <15509-59ca9b34c6573944@postgresql.org>

=?utf-8?q?PG_Bug_reporting_form?= <noreply@postgresql.org> writes:
> 1) While installing postgres i have selected only Locale [Default Locale]
> and install postgres in win10

What would "Default Locale" mean?

> 2) Create a database with non ascii name example : Química Ltda
> Script used :-
> CREATE DATABASE "Química Ltda"  WITH ENCODING='UTF8'  OWNER postgres  
> CONNECTION LIMIT=-1;

> 3) Use command prompt to take a pg_dump
> Command used
> --host localhost --port 7555 --username postgres --format=d --verbose 
> --jobs=10 --compress 9 --file "C:\Delete\vt" --dbname "Química"

> 4) Error thrown 
> pg_dump: [archiver (db)] connection to database "Química Ltda" failed:
> FATAL:  database "Química Ltda" does not exist

The most likely theory here is that the encoding that was used to store
the name "Química Ltda" is not the same one that your terminal window
is using.  Postgres doesn't provide any mechanism for transcoding database
or role names --- whatever bytes show up in the connection request packet
have to match what is in pg_database (resp. pg_authid).  It'd be nice to
do better than that, but generally we have little idea at that point what
encoding the client thinks it's using.

Note that the command you show above doesn't guarantee that the database
name was stored with UTF8 encoding --- it would've been whatever encoding
was in use in the database you issued the CREATE DATABASE command in.

			regards, tom lane




view thread (2+ messages)

Message-ID: <20144.1542345747@sss.pgh.pa.us>
Permalink:  ../20144.1542345747@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/20144.1542345747@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, vinod.t.v@outlook.com
  Subject: Re: BUG #15509: Pg_Dump failed if Database name contains non ascii characters
  In-Reply-To: <20144.1542345747@sss.pgh.pa.us>
  References: <15509-59ca9b34c6573944@postgresql.org> <20144.1542345747@sss.pgh.pa.us>

* 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