Skip to content

Commit 94e8251

Browse files
committed
Document more #ifdef's into config.h
Get rid of ESCAPE_PATCH ifdef, as its on by default, and there is no apparent reason for turning it off...it fixes a bug
1 parent 1c00e68 commit 94e8251

File tree

2 files changed

+7
-24
lines changed

2 files changed

+7
-24
lines changed

src/backend/commands/async.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.2 1996/10/05 20:30:31 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.3 1996/10/18 05:59:15 scrappy Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -295,13 +295,13 @@ Async_NotifyAtCommit()
295295
notifyFrontEndPending = 1;
296296
} else {
297297
elog(DEBUG, "Notifying others");
298-
#ifndef WIN32
298+
#ifndef win32
299299
if (kill(DatumGetInt32(d), SIGUSR2) < 0) {
300300
if (errno == ESRCH) {
301301
heap_delete(lRel, &lTuple->t_ctid);
302302
}
303303
}
304-
#endif /* WIN32 */
304+
#endif /* win32 */
305305
}
306306
}
307307
ReleaseBuffer(b);

src/backend/commands/copy.c

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
*
88
* IDENTIFICATION
9-
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.7 1996/08/27 22:17:08 scrappy Exp $
9+
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.8 1996/10/18 05:59:17 scrappy Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -44,6 +44,9 @@
4444
#include "utils/palloc.h"
4545
#include "fmgr.h"
4646

47+
#define ISOCTAL(c) (((c) >= '0') && ((c) <= '7'))
48+
#define VALUE(c) ((c) - '0')
49+
4750
/*
4851
* New copy code.
4952
*
@@ -745,9 +748,6 @@ CopyReadAttribute(FILE *fp, bool *isnull, char *delim)
745748
return(NULL);
746749
else if (c == '\\') {
747750
c = getc(fp);
748-
#ifdef ESCAPE_PATCH
749-
#define ISOCTAL(c) (((c) >= '0') && ((c) <= '7'))
750-
#define VALUE(c) ((c) - '0')
751751
if (feof(fp))
752752
return(NULL);
753753
switch (c) {
@@ -809,7 +809,6 @@ CopyReadAttribute(FILE *fp, bool *isnull, char *delim)
809809
return(NULL);
810810
break;
811811
}
812-
#endif
813812
}else if (inString(c,delim) || c == '\n') {
814813
done = 1;
815814
}
@@ -821,7 +820,6 @@ CopyReadAttribute(FILE *fp, bool *isnull, char *delim)
821820
return(&attribute[0]);
822821
}
823822

824-
#ifdef ESCAPE_PATCH
825823
static void
826824
CopyAttributeOut(FILE *fp, char *string, char *delim)
827825
{
@@ -853,21 +851,6 @@ CopyAttributeOut(FILE *fp, char *string, char *delim)
853851
fputc(*string, fp);
854852
}
855853
}
856-
#else
857-
static void
858-
CopyAttributeOut(FILE *fp, char *string, char *delim)
859-
{
860-
int i;
861-
int len = strlen(string);
862-
863-
for (i = 0; i < len; i++) {
864-
if (string[i] == delim[0] || string[i] == '\n' || string[i] == '\\') {
865-
fputc('\\', fp);
866-
}
867-
fputc(string[i], fp);
868-
}
869-
}
870-
#endif
871854

872855
/*
873856
* Returns the number of tuples in a relation. Unfortunately, currently

0 commit comments

Comments
 (0)