index 667045510389dc455e529cae9254787c8adfa0d3..faa151384dcd04f9aedd9160a6f336b1fcc676bc 100644 (file)
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.171 2004年10月07日 15:21:51 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.172 2004年10月09日 02:46:40 momjian Exp $
*
*-------------------------------------------------------------------------
*/
* up pre-creating an extra log segment. That seems OK, and better
* than holding the lock throughout this lengthy process.
*/
- snprintf(tmppath, MAXPGPATH, "%s/xlogtemp.%d",
- XLogDir, (int) getpid());
+ snprintf(tmppath, MAXPGPATH, "%s/xlogtemp.%d", XLogDir, getpid());
unlink(tmppath);
/*
* Copy into a temp file name.
*/
- snprintf(tmppath, MAXPGPATH, "%s/xlogtemp.%d",
- XLogDir, (int) getpid());
+ snprintf(tmppath, MAXPGPATH, "%s/xlogtemp.%d", XLogDir, getpid());
unlink(tmppath);
@@ -2900,8 +2898,7 @@ writeTimeLineHistory(TimeLineID newTLI, TimeLineID parentTLI,
/*
* Write into a temp file name.
*/
- snprintf(tmppath, MAXPGPATH, "%s/xlogtemp.%d",
- XLogDir, (int) getpid());
+ snprintf(tmppath, MAXPGPATH, "%s/xlogtemp.%d", XLogDir, getpid());
unlink(tmppath);
index 1cef96f35122f36ebac5bed577378e98a6f9c2f1..80833aee6042da9bd8ca8f1bb820e7412d698f44 100644 (file)
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/error/elog.c,v 1.153 2004年10月09日 01:24:47 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/error/elog.c,v 1.154 2004年10月09日 02:46:41 momjian Exp $
*
*-------------------------------------------------------------------------
*/
case 'c':
if (MyProcPort)
{
- appendStringInfo(buf, "%lx.%lx",
+ appendStringInfo(buf, "%lx.%x",
(long) (MyProcPort->session_start.tv_sec),
- (long) MyProcPid);
+ MyProcPid);
}
break;
case 'p':
- appendStringInfo(buf, "%ld", (long) MyProcPid);
+ appendStringInfo(buf, "%d", MyProcPid);
break;
case 'l':
appendStringInfo(buf, "%ld", log_line_number);
index 3d8752a8888785053fc50ac9e73a3b48fe73252a..10b6227685442753d85d0a579ff1683cbd2b12f6 100644 (file)
*
* Copyright (c) 2000-2004, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.126 2004年10月07日 15:21:56 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.127 2004年10月09日 02:46:41 momjian Exp $
*/
#include "postgres_fe.h"
#include "command.h"
@@ -1132,9 +1132,8 @@ do_edit(const char *filename_arg, PQExpBuffer query_buf)
#ifndef WIN32
const char *tmpdirenv = getenv("TMPDIR");
- snprintf(fnametmp, sizeof(fnametmp), "%s/psql.edit.%ld.%ld",
- tmpdirenv ? tmpdirenv : "/tmp",
- (long) geteuid(), (long) getpid());
+ snprintf(fnametmp, sizeof(fnametmp), "%s/psql.edit.%d.%d",
+ tmpdirenv ? tmpdirenv : "/tmp", geteuid(), getpid());
#else
GetTempFileName(".", "psql", 0, fnametmp);
#endif
index 69789d9da178e01db3b409ed04a9e07aa4021ca6..1581df761744cf27938c86bf56d3b1f1860e41cd 100644 (file)
-/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.22 2004年08月29日 05:06:59 momjian Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.23 2004年10月09日 02:46:42 momjian Exp $ */
#define POSTGRES_ECPG_INTERNAL
#include "postgres_fe.h"
return;
}
- sprintf(f, "[%d]: %s", (int) getpid(), format);
+ sprintf(f, "[%d]: %s", getpid(), format);
va_start(ap, format);
vfprintf(debugstream, f, ap);