Commit 94e82514 authored by Marc G. Fournier's avatar Marc G. Fournier

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
parent 1c00e68f
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.2 1996/10/05 20:30:31 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.3 1996/10/18 05:59:15 scrappy Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -295,13 +295,13 @@ Async_NotifyAtCommit() ...@@ -295,13 +295,13 @@ Async_NotifyAtCommit()
notifyFrontEndPending = 1; notifyFrontEndPending = 1;
} else { } else {
elog(DEBUG, "Notifying others"); elog(DEBUG, "Notifying others");
#ifndef WIN32 #ifndef win32
if (kill(DatumGetInt32(d), SIGUSR2) < 0) { if (kill(DatumGetInt32(d), SIGUSR2) < 0) {
if (errno == ESRCH) { if (errno == ESRCH) {
heap_delete(lRel, &lTuple->t_ctid); heap_delete(lRel, &lTuple->t_ctid);
} }
} }
#endif /* WIN32 */ #endif /* win32 */
} }
} }
ReleaseBuffer(b); ReleaseBuffer(b);
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.7 1996/08/27 22:17:08 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.8 1996/10/18 05:59:17 scrappy Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -44,6 +44,9 @@ ...@@ -44,6 +44,9 @@
#include "utils/palloc.h" #include "utils/palloc.h"
#include "fmgr.h" #include "fmgr.h"
#define ISOCTAL(c) (((c) >= '0') && ((c) <= '7'))
#define VALUE(c) ((c) - '0')
/* /*
* New copy code. * New copy code.
* *
...@@ -745,9 +748,6 @@ CopyReadAttribute(FILE *fp, bool *isnull, char *delim) ...@@ -745,9 +748,6 @@ CopyReadAttribute(FILE *fp, bool *isnull, char *delim)
return(NULL); return(NULL);
else if (c == '\\') { else if (c == '\\') {
c = getc(fp); c = getc(fp);
#ifdef ESCAPE_PATCH
#define ISOCTAL(c) (((c) >= '0') && ((c) <= '7'))
#define VALUE(c) ((c) - '0')
if (feof(fp)) if (feof(fp))
return(NULL); return(NULL);
switch (c) { switch (c) {
...@@ -809,7 +809,6 @@ CopyReadAttribute(FILE *fp, bool *isnull, char *delim) ...@@ -809,7 +809,6 @@ CopyReadAttribute(FILE *fp, bool *isnull, char *delim)
return(NULL); return(NULL);
break; break;
} }
#endif
}else if (inString(c,delim) || c == '\n') { }else if (inString(c,delim) || c == '\n') {
done = 1; done = 1;
} }
...@@ -821,7 +820,6 @@ CopyReadAttribute(FILE *fp, bool *isnull, char *delim) ...@@ -821,7 +820,6 @@ CopyReadAttribute(FILE *fp, bool *isnull, char *delim)
return(&attribute[0]); return(&attribute[0]);
} }
#ifdef ESCAPE_PATCH
static void static void
CopyAttributeOut(FILE *fp, char *string, char *delim) CopyAttributeOut(FILE *fp, char *string, char *delim)
{ {
...@@ -853,21 +851,6 @@ CopyAttributeOut(FILE *fp, char *string, char *delim) ...@@ -853,21 +851,6 @@ CopyAttributeOut(FILE *fp, char *string, char *delim)
fputc(*string, fp); fputc(*string, fp);
} }
} }
#else
static void
CopyAttributeOut(FILE *fp, char *string, char *delim)
{
int i;
int len = strlen(string);
for (i = 0; i < len; i++) {
if (string[i] == delim[0] || string[i] == '\n' || string[i] == '\\') {
fputc('\\', fp);
}
fputc(string[i], fp);
}
}
#endif
/* /*
* Returns the number of tuples in a relation. Unfortunately, currently * Returns the number of tuples in a relation. Unfortunately, currently
......
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