mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
Preliminary code cleanup in elog(). Split out some code into utility
functions, remove indent support, make sure all strings are marked translatable.
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.138 2001/06/01 02:41:35 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.139 2001/06/08 21:16:48 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -59,7 +59,7 @@ static const char BinarySignature[12] = "PGBCOPY\n\377\r\n\0";
|
||||
* Static communication variables ... pretty grotty, but COPY has
|
||||
* never been reentrant...
|
||||
*/
|
||||
int lineno = 0; /* exported for use by elog() -- dz */
|
||||
int copy_lineno = 0; /* exported for use by elog() -- dz */
|
||||
static bool fe_eof;
|
||||
|
||||
/*
|
||||
@ -705,14 +705,14 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp,
|
||||
values = (Datum *) palloc(attr_count * sizeof(Datum));
|
||||
nulls = (char *) palloc(attr_count * sizeof(char));
|
||||
|
||||
lineno = 0;
|
||||
copy_lineno = 0;
|
||||
fe_eof = false;
|
||||
|
||||
while (!done)
|
||||
{
|
||||
CHECK_FOR_INTERRUPTS();
|
||||
|
||||
lineno++;
|
||||
copy_lineno++;
|
||||
|
||||
/* Reset the per-output-tuple exprcontext */
|
||||
ResetPerTupleExprContext(estate);
|
||||
@ -920,7 +920,7 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp,
|
||||
/*
|
||||
* Done, clean up
|
||||
*/
|
||||
lineno = 0;
|
||||
copy_lineno = 0;
|
||||
|
||||
pfree(values);
|
||||
pfree(nulls);
|
||||
|
Reference in New Issue
Block a user