Magnus Hagander wrote:
> On Thu, Jan 7, 2010 at 02:37, Takahiro Itagaki
> <itagaki.takah...@oss.ntt.co.jp> wrote:

> > I have a Windows-specific patch for open(), attached for reference.
> > But we need to consider about other issues:
> >
> >  - We need to consider about not only only open(), but also opendir(),
> >    stat() and symlink().
> >
> >  - An entirely-different fix is needed for non-Windows platforms.
> >    Probably we will convert encodings from GetDatabaseEncoding() to
> >    GetPlatformEncoding() in MBCS, but this is not needed on Windows.
> >    We should consider avoiding random ifdef blocks for the switching.
> 
> Shouldn't we develop this with "multi-platform" in mind from the
> start, instead of doing a Windows specific patch? It may be that we
> end up with two completely different codepaths, but more likely we can
> share some of it between them?

I'm not sure there's a lot you can do in platforms other than Windows.
On Windows the filenames are all Unicode and you know you can get them
using UTF16.  On other platforms it could be anything, and it is
certainly not server_encoding; even different filesystems can use
different encodings.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to