Re: pg_dump -Ft failed on Windows XP

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Peter Eisentraut" <peter_e(at)gmx(dot)net>
Cc: <pgsql-hackers(at)postgresql(dot)org>, "Yoshiyuki Asaba" <y-asaba(at)sraoss(dot)co(dot)jp>
Subject: Re: pg_dump -Ft failed on Windows XP
Date: 2006-04-20 11:21:13
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCEA352D2@algol.sollentuna.se
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> > Question: Is the use of O_TEMPORARY to open() portable? (my
> win32 docs
> > say it will make the file automatically deleted when the last
> > descriptor is closed, which I didn't know before. That
> would make the
> > patch much simpler, but might require #ifdefs?)
>
> I think it would be more elegant if you wrote a replacement
> implementation of
> tmpfile() for pgport and did not change pg_dump at all.
> And/or write a bug to Microsoft about a buggy C library. :)

It's not buggy. It's well documented behaviour,and per my linux manpage
for the file it's also OK per spec:

The standard does not specify the directory that tmpfile()
will use. Glibc will try the path prefix P_tmpdir defined
in <stdio.h>, and if that fails the directory /tmp.

It's certainly *stupid*, but not buggy ;-)

//Magnus

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2006-04-20 11:53:30 Re: pg_dump -Ft failed on Windows XP
Previous Message Peter Eisentraut 2006-04-20 11:19:47 Re: pg_dump -Ft failed on Windows XP