Commit 33bf73a7 authored by Bruce Momjian's avatar Bruce Momjian

Make the psql line counter 64-bit so it can handle files > 4gig lines.

David Fetter
parent 6932048b
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* Copyright (c) 2000-2006, PostgreSQL Global Development Group * Copyright (c) 2000-2006, PostgreSQL Global Development Group
* *
* $PostgreSQL: pgsql/src/bin/psql/common.c,v 1.122 2006/07/14 14:52:26 momjian Exp $ * $PostgreSQL: pgsql/src/bin/psql/common.c,v 1.123 2006/08/11 19:20:59 momjian Exp $
*/ */
#include "postgres_fe.h" #include "postgres_fe.h"
#include "common.h" #include "common.h"
...@@ -188,7 +188,7 @@ psql_error(const char *fmt,...) ...@@ -188,7 +188,7 @@ psql_error(const char *fmt,...)
fflush(pset.queryFout); fflush(pset.queryFout);
if (pset.inputfile) if (pset.inputfile)
fprintf(stderr, "%s:%s:%u: ", pset.progname, pset.inputfile, pset.lineno); fprintf(stderr, "%s:%s:" UINT64_FORMAT ": ", pset.progname, pset.inputfile, pset.lineno);
va_start(ap, fmt); va_start(ap, fmt);
vfprintf(stderr, _(fmt), ap); vfprintf(stderr, _(fmt), ap);
va_end(ap); va_end(ap);
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* Copyright (c) 2000-2006, PostgreSQL Global Development Group * Copyright (c) 2000-2006, PostgreSQL Global Development Group
* *
* $PostgreSQL: pgsql/src/bin/psql/mainloop.c,v 1.81 2006/07/14 14:52:26 momjian Exp $ * $PostgreSQL: pgsql/src/bin/psql/mainloop.c,v 1.82 2006/08/11 19:20:59 momjian Exp $
*/ */
#include "postgres_fe.h" #include "postgres_fe.h"
#include "mainloop.h" #include "mainloop.h"
...@@ -44,7 +44,7 @@ MainLoop(FILE *source) ...@@ -44,7 +44,7 @@ MainLoop(FILE *source)
/* Save the prior command source */ /* Save the prior command source */
FILE *prev_cmd_source; FILE *prev_cmd_source;
bool prev_cmd_interactive; bool prev_cmd_interactive;
unsigned int prev_lineno; uint64 prev_lineno;
/* Save old settings */ /* Save old settings */
prev_cmd_source = pset.cur_cmd_source; prev_cmd_source = pset.cur_cmd_source;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* Copyright (c) 2000-2006, PostgreSQL Global Development Group * Copyright (c) 2000-2006, PostgreSQL Global Development Group
* *
* $PostgreSQL: pgsql/src/bin/psql/settings.h,v 1.27 2006/03/05 15:58:52 momjian Exp $ * $PostgreSQL: pgsql/src/bin/psql/settings.h,v 1.28 2006/08/11 19:20:59 momjian Exp $
*/ */
#ifndef SETTINGS_H #ifndef SETTINGS_H
#define SETTINGS_H #define SETTINGS_H
...@@ -50,7 +50,7 @@ typedef struct _psqlSettings ...@@ -50,7 +50,7 @@ typedef struct _psqlSettings
char *inputfile; /* for error reporting */ char *inputfile; /* for error reporting */
char *dirname; /* current directory for \s display */ char *dirname; /* current directory for \s display */
unsigned lineno; /* also for error reporting */ uint64 lineno; /* also for error reporting */
bool timing; /* enable timing of all queries */ bool timing; /* enable timing of all queries */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment