aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2005-08-22 20:25:03 +0000
committerBruce Momjian <bruce@momjian.us>2005-08-22 20:25:03 +0000
commit9bddb5c8c75bce2caf075a7127dcc291089d9bf1 (patch)
tree8296d0693649b5edbe455acdf9fc6c6c42719c07 /src
parent83357da684b66c5ed50aac0326042fdcda7e3757 (diff)
downloadpostgresql-9bddb5c8c75bce2caf075a7127dcc291089d9bf1.tar.gz
postgresql-9bddb5c8c75bce2caf075a7127dcc291089d9bf1.zip
Back out incorrect use of E'' escape addition.
Diffstat (limited to 'src')
-rw-r--r--src/interfaces/ecpg/preproc/preproc.y17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/interfaces/ecpg/preproc/preproc.y b/src/interfaces/ecpg/preproc/preproc.y
index e0cadf87842..acd734ad06b 100644
--- a/src/interfaces/ecpg/preproc/preproc.y
+++ b/src/interfaces/ecpg/preproc/preproc.y
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.308 2005/07/02 17:01:53 momjian Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.309 2005/08/22 20:25:03 momjian Exp $ */
/* Copyright comment */
%{
@@ -4216,16 +4216,11 @@ Bconst: BCONST { $$ = make_name();};
Xconst: XCONST { $$ = make_name();};
Sconst: SCONST
{
- char *ret;
-
- $$ = ret = (char *)mm_alloc(strlen($1) + 4);
- if (strchr($1, '\\') != NULL)
- *ret++ = ESCAPE_STRING_SYNTAX;
- *ret++ = '\'';
- strcpy(ret, $1);
- ret += strlen($1);
- *ret++ = '\'';
- *ret++ = '\0';
+ $$ = (char *)mm_alloc(strlen($1) + 3);
+ $$[0]='\'';
+ strcpy($$+1, $1);
+ $$[strlen($1)+2]='\0';
+ $$[strlen($1)+1]='\'';
free($1);
}
;