summaryrefslogtreecommitdiff
path: root/src/backend/parser
diff options
context:
space:
mode:
authorMarc G. Fournier <scrappy@hub.org>1996-07-23 02:23:54 +0000
committerMarc G. Fournier <scrappy@hub.org>1996-07-23 02:23:54 +0000
commit7344d6989878ff313d65a6ec15b6ed027b47e248 (patch)
tree236c86b0cc4ea9d920cbdf85f32780842a488fd7 /src/backend/parser
parente11744e164c6fc3d10954bf1e2cf1f0b72804330 (diff)
Finished merging in src/backend from Dr. George's source tree
Diffstat (limited to 'src/backend/parser')
-rw-r--r--src/backend/parser/Makefile.inc6
-rw-r--r--src/backend/parser/gram.y4
-rw-r--r--src/backend/parser/scan.l10
-rw-r--r--src/backend/parser/scansup.c8
4 files changed, 20 insertions, 8 deletions
diff --git a/src/backend/parser/Makefile.inc b/src/backend/parser/Makefile.inc
index 38607f6fb01..e5390dd891e 100644
--- a/src/backend/parser/Makefile.inc
+++ b/src/backend/parser/Makefile.inc
@@ -7,7 +7,7 @@
#
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/parser/Attic/Makefile.inc,v 1.1.1.1 1996/07/09 06:21:39 scrappy Exp $
+# $Header: /cvsroot/pgsql/src/backend/parser/Attic/Makefile.inc,v 1.2 1996/07/23 02:23:32 scrappy Exp $
#
#-------------------------------------------------------------------------
@@ -34,13 +34,13 @@ $(objdir)/scan.o: scan.c
SRCS_PARSER+= analyze.c catalog_utils.c dbcommands.c gram.c \
- keywords.c parser.c parse_query.c scan.c scansup.c
+ keywords.c parser.c parse_query.c scan.c scansup.c sysfunc.c
CLEANFILES+= scan.c ${PARSEYACCS}
POSTGRES_DEPEND+= scan.c $(PARSEYACCS)
HEADERS+= catalog_utils.h io.h parse_query.h parsetree.h \
- dbcommands.h keywords.h
+ dbcommands.h keywords.h sysfunc.c
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index 19529d1fa28..4fbfbbc8aea 100644
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 1.1.1.1 1996/07/09 06:21:40 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 1.2 1996/07/23 02:23:33 scrappy Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
@@ -515,7 +515,7 @@ fetch_how_many: Iconst
{ $$ = $1;
if ($1 <= 0) elog(WARN,"Please specify nonnegative count for fetch"); }
| ALL { $$ = 0; /* 0 means fetch all tuples*/}
- | /*EMPTY*/ { $$ = 0; /*default*/ }
+ | /*EMPTY*/ { $$ = 1; /*default*/ }
;
/*****************************************************************************
diff --git a/src/backend/parser/scan.l b/src/backend/parser/scan.l
index d3b3b9a3f26..5bbe242c31d 100644
--- a/src/backend/parser/scan.l
+++ b/src/backend/parser/scan.l
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.1.1.1 1996/07/09 06:21:41 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.2 1996/07/23 02:23:34 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
@@ -29,6 +29,7 @@
#include "nodes/parsenodes.h"
#include "parser/keywords.h"
#include "parser/scansup.h"
+#include "parser/sysfunc.h"
#include "parse.h"
#include "utils/elog.h"
#include "utils/palloc.h"
@@ -61,6 +62,8 @@ digit [0-9]
letter [_A-Za-z]
letter_or_digit [_A-Za-z0-9]
+sysfunc SYS_{letter}{letter_or_digit}*
+
identifier {letter}{letter_or_digit}*
self [,()\[\].;$\:\+\-\*\/\<\>\=\|]
@@ -83,6 +86,11 @@ space [ \t\n\f]
other .
%%
+{sysfunc} {
+ yylval.str = pstrdup(SystemFunctionHandler((char *)yytext));
+ return (SCONST);
+ }
+
{comment} { /* ignore */ }
"::" { return TYPECAST; }
diff --git a/src/backend/parser/scansup.c b/src/backend/parser/scansup.c
index bd7ef26004e..daacf8b2060 100644
--- a/src/backend/parser/scansup.c
+++ b/src/backend/parser/scansup.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/scansup.c,v 1.1.1.1 1996/07/09 06:21:41 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/scansup.c,v 1.2 1996/07/23 02:23:35 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
@@ -134,7 +134,11 @@ scanstr(char *s)
}
}
default:
- elog (WARN, "Bad escape sequence, s[i] = %d", s[i]);
+#ifdef ESCAPE_PATCH
+ newStr[j] = s[i];
+#else
+ elog (WARN, "Bad escape sequence, s[i] = %d", s[i]);
+#endif
} /* switch */
} /* s[i] == '\\' */
else