Skip site navigation (1) Skip section navigation (2)

[Bug] COPY staments with paths containing non-ASCII characters under WinXP

From: "Joachim Raue" <raue(at)gmx(dot)net>
To: <pgsql-bugs(at)postgresql(dot)org>
Subject: [Bug] COPY staments with paths containing non-ASCII characters under WinXP
Date: 2009-12-23 16:44:49
Message-ID: 012d01ca83ef$3f075cf0$bd1616d0$@net (view raw or flat)
Thread:
Lists: pgsql-bugs
Hi,

 

I observed following bug in Postgres 8.4 under Windows XP with German
locale:

 

-          I create a text file C:\Foo\Föö.txt with valid one column CSV
content, let it be “a” in quotes

-          In PgAdmin 1.10.0, I then run:


CREATE DATABASE test

       ENCODING = 'UTF8'

       LC_COLLATE = 'German_Germany.1252'

       LC_CTYPE = 'German_Germany.1252'

       CONNECTION LIMIT = -1;

                

create table bar (

                foobar text

);

 

COPY bar FROM E'C:\\Foo\\Föö.txt' WITH CSV

 

-          The COPY statement will fail if the path contains special
characters. Renaming Föö into Foo would work. Message returned in German
locale:

 

FEHLER:  konnte Datei »C:\Foo\Föö.txt« nicht zum Lesen öffnen: No such file
or directory

 

********** Fehler **********

 

FEHLER: konnte Datei »C:\Foo\Föö.txt« nicht zum Lesen öffnen: No such file
or directory

SQL Status:58P01

 

Your advice on worksarounds is appreciated. My guess is that the problem is
the file name being given in UTF8 (DB default), but Windows paths being
stored in an 1-bye encoding.

 

Best wishes and seasonal greetings,

 

Joachim

 

 

pgsql-bugs by date

Next:From: Heikki LinnakangasDate: 2009-12-23 17:38:46
Subject: Re: BUG #5254: can't drop a table
Previous:From: Daniel ConvissorDate: 2009-12-23 16:32:20
Subject: Re: BUG #5253: installer fails to populate data directory

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group