projects
/
users
/
bernd
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b354100
)
Fix counting of lines in scripts with 'copy from stdin'.
author
Peter Eisentraut
<peter_e@gmx.net>
Sun, 3 Dec 2000 15:39:38 +0000
(15:39 +0000)
committer
Peter Eisentraut
<peter_e@gmx.net>
Sun, 3 Dec 2000 15:39:38 +0000
(15:39 +0000)
src/bin/psql/copy.c
patch
|
blob
|
blame
|
history
diff --git
a/src/bin/psql/copy.c
b/src/bin/psql/copy.c
index 2e27ecb1ed36f6073995189634cd8020c56709de..14082417b6732ae11e3039a6fa8ef8627130cc50 100644
(file)
--- a/
src/bin/psql/copy.c
+++ b/
src/bin/psql/copy.c
@@
-403,6
+403,7
@@
handleCopyIn(PGconn *conn, FILE *copystream, const char *prompt)
int bufleft;
int c = 0;
int ret;
+ unsigned int linecount=0;
#ifdef USE_ASSERT_CHECKING
assert(copy_in_state);
@@
-458,8
+459,10
@@
handleCopyIn(PGconn *conn, FILE *copystream, const char *prompt)
}
}
PQputline(conn, "\n");
+ linecount++;
}
ret = !PQendcopy(conn);
copy_in_state = false;
+ pset.lineno += linecount;
return ret;
}