Re: Solution of the file name problem of copy on windows. - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Solution of the file name problem of copy on windows.
Date
Msg-id 734.1239632077@sss.pgh.pa.us
Whole thread Raw
In response to Re: Solution of the file name problem of copy on windows.  (Itagaki Takahiro <itagaki.takahiro@oss.ntt.co.jp>)
Responses Re: Solution of the file name problem of copy on windows.  (Itagaki Takahiro <itagaki.takahiro@oss.ntt.co.jp>)
List pgsql-hackers
Itagaki Takahiro <itagaki.takahiro@oss.ntt.co.jp> writes:
> Here is a patch to implement GetPlatformEncoding() and convert absolute
> file paths from database encoding to platform encoding.

This seems like a fairly significant overhead added to solve a really
minor problem (if it's not minor why has it never come up before?).

I'm also not convinced by any of the details --- why are GetACP and
pg_get_encoding_from_locale the things to look at, and why is fd.c an
appropriate place to hook in?  Surely if we need it here, we need it in
places like initdb as well.  But really this is much too low a level to
be solving the problem at.  If we have to convert path encodings in the
backend, we should be doing it once somewhere around the place where we
identify the value of PGDATA.  It should not be necessary to repeat all
this for every file access within the database directory.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: New trigger option of pg_standby
Next
From: Tom Lane
Date:
Subject: Re: [PATCH] Add a test for pg_get_functiondef()