pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #15509: Pg_Dump failed if Database name contains non ascii characters
2+ messages / 2 participants
[nested] [flat]

* BUG #15509: Pg_Dump failed if Database name contains non ascii characters
@ 2018-11-16 05:06  PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 1 reply; 2+ messages in thread

From: PG Bug reporting form @ 2018-11-16 05:06 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: vinod.t.v@outlook.com

The following bug has been logged on the website:

Bug reference:      15509
Logged by:          vinod tv
Email address:      vinod.t.v@outlook.com
PostgreSQL version: 9.6.10
Operating system:   Windows 10
Description:        

Steps:
1) While installing postgres i have selected only Locale [Default Locale]
and install postgres in win10

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

Expecting a reply...



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #15509: Pg_Dump failed if Database name contains non ascii characters
@ 2018-11-16 05:22  Tom Lane <tgl@sss.pgh.pa.us>
  parent: PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2018-11-16 05:22 UTC (permalink / raw)
  To: vinod.t.v@outlook.com; +Cc: pgsql-bugs@lists.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




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2018-11-16 05:22 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-11-16 05:06 BUG #15509: Pg_Dump failed if Database name contains non ascii characters PG Bug reporting form <noreply@postgresql.org>
2018-11-16 05:22 ` Tom Lane <tgl@sss.pgh.pa.us>

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