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

mylog() + qlog() implementation

From: Kristis Makris <kristis(dot)makris(at)datasoft(dot)com>
To: pgsql-odbc(at)postgresql(dot)org
Subject: mylog() + qlog() implementation
Date: 2002-05-07 16:01:32
Message-ID: 1020787292.30031.6.camel@leonidas (view raw or flat)
Thread:
Lists: pgsql-odbc
Hello,

I noticed that in misc.c:mylog() (same goes for qlog()), the logfile is
opened as "w" or "wb" in the WIN32 case. I've also noticed that
sometimes my log files while testing get truncated if I open multiple
connections through the odbc driver, close them down, and then open some
more, while still using the same custom-build application without
exiting (thus generate_filename() picks up the same pid for it). Hiroshi
will probably need to verify this, otherwise it's all speculation.

Would it be possible to consider fopen()ing the mylog file as "a" and
"ab" in WIN32 for appending vs zeroing out the log file, as described in
the attached patch? 

Thanks,
Kristis

Attachment: misc.h.patch
Description: text/x-patch (530 bytes)

Responses

pgsql-odbc by date

Next:From: Ed BrownDate: 2002-05-07 23:03:01
Subject: Parse Errors with prepared query
Previous:From: Hiroshi InoueDate: 2002-05-07 08:10:13
Subject: Re: Dignostics?

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