[PATCHES] Bad bug in fopen() wrapper code

2006-09-24 Thread Magnus Hagander
There is a small bug in the fopen() wrapper code that was applied a couple of weeks back for win32. It sets the wrong flags for files opened in "append" mode. This makes the logfile writing not work - syslog.c opens the logfile in append mode, but if the file does not already exist, it will not be

[PATCHES] pg_ctl error msg on Windows 2000

2006-09-24 Thread Magnus Hagander
On version of Windows prior to XP, pg_ctl will *always* log a warning about not finding Job API functions. This is probably unnecessary, since they are never present there. The check was originally intended to give a warning if something was wrong on a system where it was *expected*. Attached patc

[PATCHES] Updates to pg_regress.c

2006-09-24 Thread Magnus Hagander
Found a couple of "XXX is there a way to do this on Windows" in pg_regress.c that I had missed. The answer to the question is yes, attached is a patch that does it. //Magnus pg_regress.diff Description: pg_regress.diff ---(end of broadcast)--- TI

Re: [PATCHES] Bad bug in fopen() wrapper code

2006-09-24 Thread Tom Lane
"Magnus Hagander" <[EMAIL PROTECTED]> writes: > Attached patch sets the O_CREAT option when appending to files. That looks correct, but I went looking to see if there were any other mistakes of the same ilk, and I'm wondering what the sense is in openFlagsToCreateFileFlags ... seems like it's ign

Re: [PATCHES] pg_ctl error msg on Windows 2000

2006-09-24 Thread Tom Lane
"Magnus Hagander" <[EMAIL PROTECTED]> writes: > On version of Windows prior to XP, pg_ctl will *always* log a warning > about not finding Job API functions. This is probably unnecessary, since > they are never present there. The check was originally intended to give > a warning if something was wro

Re: [PATCHES] Bad bug in fopen() wrapper code

2006-09-24 Thread Magnus Hagander
> > Attached patch sets the O_CREAT option when appending to files. > > That looks correct, but I went looking to see if there were > any other mistakes of the same ilk, and I'm wondering what > the sense is in openFlagsToCreateFileFlags ... seems like > it's ignoring O_EXCL in some combinatio

Re: [PATCHES] Updates to pg_regress.c

2006-09-24 Thread Tom Lane
"Magnus Hagander" <[EMAIL PROTECTED]> writes: > Found a couple of "XXX is there a way to do this on Windows" in > pg_regress.c that I had missed. The answer to the question is yes, > attached is a patch that does it. Applied, along with change to make it start the temp postmaster as "postgres" not

Re: [PATCHES] Bad bug in fopen() wrapper code

2006-09-24 Thread Tom Lane
"Magnus Hagander" <[EMAIL PROTECTED]> writes: > That is part of the original open() code that Claudio did back for 8.0, > so it has definitly been working since then. Hm, maybe best not to touch it, but still... > I haven't really read into > the code, though... But a qiuck look doesn't show me a

Re: [PATCHES] Bad bug in fopen() wrapper code

2006-09-24 Thread Tom Lane
"Magnus Hagander" <[EMAIL PROTECTED]> writes: > This is pretty bad and pretty urgent - with this, systems installed by > the MSI installer simply *do not start*, because they are by default > configured to write logs to a file... > Attached patch sets the O_CREAT option when appending to files.

Re: [PATCHES] [HACKERS] large object regression tests

2006-09-24 Thread Jeremy Drake
On Thu, 21 Sep 2006, Tom Lane wrote: > Jeremy Drake <[EMAIL PROTECTED]> writes: > > I put together a patch which adds a regression test for large objects, > > hopefully attached to this message. I would like some critique of it, to > > see if I have gone about it the right way. Also I would be h

Re: [PATCHES] Bad bug in fopen() wrapper code

2006-09-24 Thread Claudio Natoli
Hello guys, it's been a while, but... > What's bugging me is that 0 and O_EXCL give the same answer, and > O_TRUNC and O_TRUNC | O_EXCL give the same answer, This is ok, as (iirc) O_EXCL only has effect in the presence of O_CREAT. (a comment to this effect would help here, as well as perhaps l

Re: [PATCHES] [HACKERS] large object regression tests

2006-09-24 Thread Jeremy Drake
On Sun, 24 Sep 2006, Jeremy Drake wrote: > On Thu, 21 Sep 2006, Tom Lane wrote: > > > I suggest that instead of testing the server-side lo_import/lo_export > > functions, perhaps you could test the psql equivalents and write and > > read a file in psql's working directory. > > I did not see any pr

Re: [PATCHES] [HACKERS] large object regression tests

2006-09-24 Thread Bort, Paul
Jeremy Drake wrote: > > I am open to suggestions. I saw one suggestion that I use an > image of an elephant, but I suspect that was tongue-in-cheek. > I am not very fond of the idea of generating repetitious > data, as I think it would be more difficult to determine > whether or not the lose