File tree 5 files changed +60
-4
lines changed
5 files changed +60
-4
lines changed Original file line number Diff line number Diff line change 2
2
/* NdBox = [(lowerleft),(upperright)] */
3
3
/* [(xLL(1)...xLL(N)),(xUR(1)...xUR(n))] */
4
4
5
- /* $PostgreSQL: pgsql/contrib/cube/cubeparse.y,v 1.17 2007/02/27 23:48:05 tgl Exp $ */
5
+ /* $PostgreSQL: pgsql/contrib/cube/cubeparse.y,v 1.18 2008/09/02 20:37:54 tgl Exp $ */
6
6
7
7
#define YYPARSE_PARAM result /* need this to pass a pointer (void *) to yyparse */
8
8
#define YYSTYPE char *
12
12
13
13
#include " cubedata.h"
14
14
15
+ /*
16
+ * Bison doesn't allocate anything that needs to live across parser calls,
17
+ * so we can easily have it use palloc instead of malloc. This prevents
18
+ * memory leaks if we error out during parsing. Note this only works with
19
+ * bison >= 2.0. However, in bison 1.875 the default is to use alloca()
20
+ * if possible, so there's not really much problem anyhow, at least if
21
+ * you're building with gcc.
22
+ */
23
+ #define YYMALLOC palloc
24
+ #define YYFREE pfree
25
+
15
26
extern int cube_yylex (void );
16
27
17
28
static char *scanbuf;
Original file line number Diff line number Diff line change 9
9
#include " utils/builtins.h"
10
10
#include " segdata.h"
11
11
12
+ /*
13
+ * Bison doesn't allocate anything that needs to live across parser calls,
14
+ * so we can easily have it use palloc instead of malloc. This prevents
15
+ * memory leaks if we error out during parsing. Note this only works with
16
+ * bison >= 2.0. However, in bison 1.875 the default is to use alloca()
17
+ * if possible, so there's not really much problem anyhow, at least if
18
+ * you're building with gcc.
19
+ */
20
+ #define YYMALLOC palloc
21
+ #define YYFREE pfree
22
+
12
23
extern int seg_yylex (void );
13
24
14
25
extern int significant_digits (char *str); /* defined in seg.c */
Original file line number Diff line number Diff line change 9
9
*
10
10
*
11
11
* IDENTIFICATION
12
- * $PostgreSQL: pgsql/src/backend/bootstrap/bootparse.y,v 1.93 2008/09/01 20:42:43 tgl Exp $
12
+ * $PostgreSQL: pgsql/src/backend/bootstrap/bootparse.y,v 1.94 2008/09/02 20:37:54 tgl Exp $
13
13
*
14
14
*-------------------------------------------------------------------------
15
15
*/
54
54
#define atooid (x ) ((Oid) strtoul((x), NULL , 10 ))
55
55
56
56
57
+ /*
58
+ * Bison doesn't allocate anything that needs to live across parser calls,
59
+ * so we can easily have it use palloc instead of malloc. This prevents
60
+ * memory leaks if we error out during parsing. Note this only works with
61
+ * bison >= 2.0. However, in bison 1.875 the default is to use alloca()
62
+ * if possible, so there's not really much problem anyhow, at least if
63
+ * you're building with gcc.
64
+ */
65
+ #define YYMALLOC palloc
66
+ #define YYFREE pfree
67
+
57
68
static void
58
69
do_start (void )
59
70
{
Original file line number Diff line number Diff line change 11
11
*
12
12
*
13
13
* IDENTIFICATION
14
- * $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.621 2008/09/01 20:42:44 tgl Exp $
14
+ * $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.622 2008/09/02 20:37:54 tgl Exp $
15
15
*
16
16
* HISTORY
17
17
* AUTHOR DATE MAJOR EVENT
79
79
*/
80
80
#define base_yylex filtered_base_yylex
81
81
82
+ /*
83
+ * Bison doesn't allocate anything that needs to live across parser calls,
84
+ * so we can easily have it use palloc instead of malloc. This prevents
85
+ * memory leaks if we error out during parsing. Note this only works with
86
+ * bison >= 2.0. However, in bison 1.875 the default is to use alloca()
87
+ * if possible, so there's not really much problem anyhow, at least if
88
+ * you're building with gcc.
89
+ */
90
+ #define YYMALLOC palloc
91
+ #define YYFREE pfree
92
+
82
93
extern List *parsetree; /* final parse result is delivered here */
83
94
84
95
static bool QueryIsRule = FALSE ;
Original file line number Diff line number Diff line change 9
9
*
10
10
*
11
11
* IDENTIFICATION
12
- * $PostgreSQL: pgsql/src/pl/plpgsql/src/gram.y,v 1.113 2008/05/15 22:39:49 tgl Exp $
12
+ * $PostgreSQL: pgsql/src/pl/plpgsql/src/gram.y,v 1.114 2008/09/02 20:37:55 tgl Exp $
13
13
*
14
14
*-------------------------------------------------------------------------
15
15
*/
19
19
#include " parser/parser.h"
20
20
21
21
22
+ /*
23
+ * Bison doesn't allocate anything that needs to live across parser calls,
24
+ * so we can easily have it use palloc instead of malloc. This prevents
25
+ * memory leaks if we error out during parsing. Note this only works with
26
+ * bison >= 2.0. However, in bison 1.875 the default is to use alloca()
27
+ * if possible, so there's not really much problem anyhow, at least if
28
+ * you're building with gcc.
29
+ */
30
+ #define YYMALLOC palloc
31
+ #define YYFREE pfree
32
+
33
+
22
34
static PLpgSQL_expr *read_sql_construct (int until,
23
35
int until2,
24
36
int until3,
You can’t perform that action at this time.
0 commit comments