Changed statement escaping to not escape continuation line markers.
Bumped precompiler patchlevel.
This commit is contained in:
parent
59c4fc5a80
commit
6a78d754d0
@ -2322,3 +2322,13 @@ Sun, 17 Feb 2008 18:45:39 +0100
|
|||||||
- Removed duplicate include of ecpgtype.h.
|
- Removed duplicate include of ecpgtype.h.
|
||||||
- Changed INFORMIX mode symbol definition yet again because the old
|
- Changed INFORMIX mode symbol definition yet again because the old
|
||||||
way didn't work on NetBSD.
|
way didn't work on NetBSD.
|
||||||
|
|
||||||
|
Sun, 02 Mar 2008 11:50:48 +0100
|
||||||
|
|
||||||
|
- Fixed bug that caused arrays of varchar to be output with incomplete
|
||||||
|
name.
|
||||||
|
|
||||||
|
Thu, 20 Mar 2008 16:54:27 +0100
|
||||||
|
|
||||||
|
- Changed statement escaping to not escape continuation line markers.
|
||||||
|
- Bumped ecpg version number to 4.4.1.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 1998-2008, PostgreSQL Global Development Group
|
# Copyright (c) 1998-2008, PostgreSQL Global Development Group
|
||||||
#
|
#
|
||||||
# $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/Makefile,v 1.130 2008/01/01 19:45:59 momjian Exp $
|
# $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/Makefile,v 1.130.2.1 2008/03/20 16:04:52 meskes Exp $
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -15,7 +15,7 @@ include $(top_builddir)/src/Makefile.global
|
|||||||
|
|
||||||
MAJOR_VERSION= 4
|
MAJOR_VERSION= 4
|
||||||
MINOR_VERSION= 4
|
MINOR_VERSION= 4
|
||||||
PATCHLEVEL=0
|
PATCHLEVEL=1
|
||||||
|
|
||||||
override CPPFLAGS := -I../include -I$(top_srcdir)/src/interfaces/ecpg/include \
|
override CPPFLAGS := -I../include -I$(top_srcdir)/src/interfaces/ecpg/include \
|
||||||
-I$(srcdir) -DMAJOR_VERSION=$(MAJOR_VERSION) \
|
-I$(srcdir) -DMAJOR_VERSION=$(MAJOR_VERSION) \
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/output.c,v 1.23 2007/11/15 21:14:45 momjian Exp $ */
|
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/output.c,v 1.23.2.1 2008/03/20 16:04:52 meskes Exp $ */
|
||||||
|
|
||||||
#include "postgres_fe.h"
|
#include "postgres_fe.h"
|
||||||
|
|
||||||
@ -193,7 +193,18 @@ output_escaped_str(char *str, bool quoted)
|
|||||||
else if (str[i] == '\n')
|
else if (str[i] == '\n')
|
||||||
fputs("\\\n", yyout);
|
fputs("\\\n", yyout);
|
||||||
else if (str[i] == '\\')
|
else if (str[i] == '\\')
|
||||||
fputs("\\\\", yyout);
|
{
|
||||||
|
int j = i;
|
||||||
|
|
||||||
|
/* check whether this is a continuation line
|
||||||
|
* if it is, do not output anything because newlines are escaped anyway */
|
||||||
|
|
||||||
|
/* accept blanks after the '\' as some other compilers do too */
|
||||||
|
do { j++; } while (str[j] == ' ' || str[j] == '\t');
|
||||||
|
|
||||||
|
if ((str[j] != '\n') && (str[j] != '\r' || str[j + 1] != '\n')) /* not followed by a newline */
|
||||||
|
fputs("\\\\", yyout);
|
||||||
|
}
|
||||||
else if (str[i] == '\r' && str[i + 1] == '\n')
|
else if (str[i] == '\r' && str[i + 1] == '\n')
|
||||||
{
|
{
|
||||||
fputs("\\\r\n", yyout);
|
fputs("\\\r\n", yyout);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user