aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Meskes <meskes@postgresql.org>2002-06-17 13:23:27 +0000
committerMichael Meskes <meskes@postgresql.org>2002-06-17 13:23:27 +0000
commit2fabb9938813f4bf52a0a8b8c722e5cd9a58a97f (patch)
tree09981f34149db9abb341de7cb47a5cb8e8226091 /src
parente4cd7c315f1339a5e3f79b92a00433bb9c4676d6 (diff)
downloadpostgresql-2fabb9938813f4bf52a0a8b8c722e5cd9a58a97f.tar.gz
postgresql-2fabb9938813f4bf52a0a8b8c722e5cd9a58a97f.zip
Fixed parser bug concerning octal numbers in single quotes.
Diffstat (limited to 'src')
-rw-r--r--src/interfaces/ecpg/ChangeLog5
-rw-r--r--src/interfaces/ecpg/preproc/pgc.l6
2 files changed, 8 insertions, 3 deletions
diff --git a/src/interfaces/ecpg/ChangeLog b/src/interfaces/ecpg/ChangeLog
index 686114b5ae2..67ded6c3fd9 100644
--- a/src/interfaces/ecpg/ChangeLog
+++ b/src/interfaces/ecpg/ChangeLog
@@ -1265,6 +1265,11 @@ Wed Jun 12 14:04:11 CEST 2002
- Applied Lee Kindness' patch to fix one of memory allocation with
floating point numbers.
+
+Mon Jun 17 15:23:51 CEST 2002
+
+ - Fixed parser bug in pgc.l. Octal numbers in single quotes are now
+ correctly handled.
- Set ecpg version to 2.10.0.
- Set library version to 3.4.0.
diff --git a/src/interfaces/ecpg/preproc/pgc.l b/src/interfaces/ecpg/preproc/pgc.l
index d8478e3bc3b..bb250cb8ec0 100644
--- a/src/interfaces/ecpg/preproc/pgc.l
+++ b/src/interfaces/ecpg/preproc/pgc.l
@@ -12,7 +12,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.92 2002/05/20 09:29:41 meskes Exp $
+ * $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.93 2002/06/17 13:23:27 meskes Exp $
*
*-------------------------------------------------------------------------
*/
@@ -372,13 +372,13 @@ cppline {space}*#(.*\\{space})*.*
<xq>{xqstop} {
BEGIN(state_before);
yylval.str = mm_strdup(literalbuf);
+ printf("MM: %s\n", yylval.str);
return SCONST;
}
<xq>{xqdouble} { addlitchar('\''); }
<xq>{xqinside} { addlit(yytext, yyleng); }
<xq>{xqescape} { addlit(yytext, yyleng); }
-<xq>{xqoctesc} { unsigned char c = strtoul(yytext+1, NULL, 8);
- addlitchar(c); }
+<xq>{xqoctesc} { addlit(yytext, yyleng); }
<xq>{xqcat} { /* ignore */ }
<xq><<EOF>> { mmerror(PARSE_ERROR, ET_ERROR, "Unterminated quoted string"); }