summaryrefslogtreecommitdiff
path: root/src/backend/parser
diff options
context:
space:
mode:
authorBruce Momjian1999-05-03 19:10:48 +0000
committerBruce Momjian1999-05-03 19:10:48 +0000
commit210055ad614ae845686fdf9f8fc6b60301689cc8 (patch)
tree0410cff48a92bc3c95aea12877046d4ab25aaedb /src/backend/parser
parentda5f1dd7227bd507cc8d5b088fd3f5e53e932722 (diff)
here are some patches for 6.5.0 which I already submitted but have never
been applied. The patches are in the .tar.gz attachment at the end: varchar-array.patch this patch adds support for arrays of bpchar() and varchar(), which where always missing from postgres. These datatypes can be used to replace the _char4, _char8, etc., which were dropped some time ago. block-size.patch this patch fixes many errors in the parser and other program which happen with very large query statements (> 8K) when using a page size larger than 8192. This patch is needed if you want to submit queries larger than 8K. Postgres supports tuples up to 32K but you can't insert them because you can't submit queries larger than 8K. My patch fixes this problem. The patch also replaces all the occurrences of `8192' and `1<<13' in the sources with the proper constants defined in include files. You should now never find 8192 hardwired in C code, just to make code clearer. -- Massimo Dal Zotto
Diffstat (limited to 'src/backend/parser')
-rw-r--r--src/backend/parser/Makefile6
-rw-r--r--src/backend/parser/gram.y8
-rw-r--r--src/backend/parser/scan.l7
3 files changed, 12 insertions, 9 deletions
diff --git a/src/backend/parser/Makefile b/src/backend/parser/Makefile
index 8fb817c91ff..b9e955e8523 100644
--- a/src/backend/parser/Makefile
+++ b/src/backend/parser/Makefile
@@ -4,7 +4,7 @@
# Makefile for parser
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/parser/Makefile,v 1.19 1998/07/26 04:30:30 scrappy Exp $
+# $Header: /cvsroot/pgsql/src/backend/parser/Makefile,v 1.20 1999/05/03 19:09:40 momjian Exp $
#
#-------------------------------------------------------------------------
@@ -37,7 +37,9 @@ gram.c parse.h: gram.y
scan.c: scan.l
$(LEX) $<
- mv lex.yy.c scan.c
+ sed -e 's/#define YY_BUF_SIZE .*/#define YY_BUF_SIZE 65536/' \
+ <lex.yy.c >scan.c
+ rm -f lex.yy.c
# The following dependencies on parse.h are computed by
# make depend, but we state them here explicitly anyway because
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index 86f737179a3..b3836e0191d 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 2.71 1999/04/27 13:33:43 wieck Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.72 1999/05/03 19:09:41 momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
@@ -3290,7 +3290,6 @@ Typename: Array opt_array_bounds
else
$$->setof = FALSE;
}
- | Character
| SETOF Array
{
$$ = $2;
@@ -3301,6 +3300,7 @@ Typename: Array opt_array_bounds
Array: Generic
| Datetime
| Numeric
+ | Character
;
Generic: generic
@@ -3425,10 +3425,6 @@ opt_decimal: '(' Iconst ',' Iconst ')'
/* SQL92 character data types
* The following implements CHAR() and VARCHAR().
- * We do it here instead of the 'Generic' production
- * because we don't want to allow arrays of VARCHAR().
- * I haven't thought about whether that will work or not.
- * - ay 6/95
*/
Character: character '(' Iconst ')'
{
diff --git a/src/backend/parser/scan.l b/src/backend/parser/scan.l
index f87a124f092..d50ee9c62d8 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.47 1999/03/17 20:17:13 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.48 1999/05/03 19:09:42 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -32,6 +32,11 @@
#include "parse.h"
#include "utils/builtins.h"
+#ifdef YY_READ_BUF_SIZE
+#undef YY_READ_BUF_SIZE
+#endif
+#define YY_READ_BUF_SIZE MAX_PARSE_BUFFER
+
extern char *parseString;
static char *parseCh;