pgpool2.git / summary / log / commit / refs

commit    4d49859ef00b2dfe1cfc1b88619531d24dcbf46f
Author:   Tatsuo Ishii <ishii at sraoss.co.jp>
Date:     Fri Oct 12 04:34:15 2007 +0000

    Add child_idle_limit.
    # If child_idle_limit is n (n > 0), the child is forced to be
    # disconnected after n seconds idle between transactions.
    # 0 means no disconnect.
    
    Need to work on show pool_status and docs.


Makefile.am | 4 +- Makefile.in | 4 +- parser/Makefile.am | 2 +- parser/Makefile.in | 2 +- parser/gram.c | 3915 ++++++++++++++++++++++++-------------------------- parser/gram.h | 40 +- pgpool.conf.sample | 5 + pool.h | 2 + pool_config.c | 1389 ++++++++---------- pool_config.l | 26 +- pool_process_query.c | 33 +- 11 files changed, 2577 insertions(+), 2845 deletions(-) diff --git a/Makefile.am b/Makefile.am index 416ecaa70..e7445d003 100644 --- a/Makefile.am +++ b/Makefile.am @@ -19,11 +19,11 @@ DEFS = @DEFS@ \ sysconf_DATA = pgpool.conf.sample pcp.conf.sample pool_hba.conf.sample pkgdata_DATA = sql/system_db.sql sample/pgpool.pam -AM_CPPFLAGS = -Wall -Wmissing-prototypes -Wmissing-declarations -D_GNU_SOURCE -I @PGSQL_INCLUDE_DIR@ +AM_CPPFLAGS = -pg -Wall -Wmissing-prototypes -Wmissing-declarations -D_GNU_SOURCE -I @PGSQL_INCLUDE_DIR@ pgpool_LDADD = -L@PGSQL_LIB_DIR@ -lpq parser/libsql-parser.a pcp/libpcp.la parser/nodes.o if enable_rpath - pgpool_LDFLAGS = -rpath @PGSQL_LIB_DIR@ -rpath $(libdir) + pgpool_LDFLAGS = -pg -rpath @PGSQL_LIB_DIR@ -rpath $(libdir) else pgpool_LDFLAGS = endif diff --git a/Makefile.in b/Makefile.in index 3ac40c8b7..1411a28fe 100644 --- a/Makefile.in +++ b/Makefile.in @@ -249,10 +249,10 @@ pgpool_SOURCES = pool.h pool_type.h version.h pgpool.conf.sample \ pg_md5_SOURCES = pg_md5.c md5.c md5.h sysconf_DATA = pgpool.conf.sample pcp.conf.sample pool_hba.conf.sample pkgdata_DATA = sql/system_db.sql sample/pgpool.pam -AM_CPPFLAGS = -Wall -Wmissing-prototypes -Wmissing-declarations -D_GNU_SOURCE -I @PGSQL_INCLUDE_DIR@ +AM_CPPFLAGS = -pg -Wall -Wmissing-prototypes -Wmissing-declarations -D_GNU_SOURCE -I @PGSQL_INCLUDE_DIR@ pgpool_LDADD = -L@PGSQL_LIB_DIR@ -lpq parser/libsql-parser.a pcp/libpcp.la parser/nodes.o @enable_rpath_FALSE@pgpool_LDFLAGS = -@enable_rpath_TRUE@pgpool_LDFLAGS = -rpath @PGSQL_LIB_DIR@ -rpath $(libdir) +@enable_rpath_TRUE@pgpool_LDFLAGS = -pg -rpath @PGSQL_LIB_DIR@ -rpath $(libdir) AM_YFLAGS = -d man_MANS = pgpool.8 CLEANFILES = pgpool.8 diff --git a/parser/Makefile.am b/parser/Makefile.am index e549a7dcd..8ef7bef1c 100644 --- a/parser/Makefile.am +++ b/parser/Makefile.am @@ -4,7 +4,7 @@ libsql_parser_a_SOURCES = gram.y gramparse.h list.c makefuncs.c makefuncs.h memn EXTRA_DIST = scan.c scan.l -AM_CPPFLAGS = -Wall -Wmissing-prototypes -Wmissing-declarations -D_GNU_SOURCE -I .. -I @PGSQL_INCLUDE_DIR@ +AM_CPPFLAGS = -pg -Wall -Wmissing-prototypes -Wmissing-declarations -D_GNU_SOURCE -I .. -I @PGSQL_INCLUDE_DIR@ AM_YFLAGS = -d diff --git a/parser/Makefile.in b/parser/Makefile.in index 2d2e34789..229f309d5 100644 --- a/parser/Makefile.in +++ b/parser/Makefile.in @@ -190,7 +190,7 @@ target_alias = @target_alias@ noinst_LIBRARIES = libsql-parser.a libsql_parser_a_SOURCES = gram.y gramparse.h list.c makefuncs.c makefuncs.h memnodes.h nodes.h nodes.c parsenodes.h parser.c parser.h pg_list.h pool_memory.c pool_memory.h pool_string.c pool_string.h primnodes.h scansup.h value.c value.h keywords.h keywords.c pool_parser.h outfuncs.c copyfuncs.c EXTRA_DIST = scan.c scan.l -AM_CPPFLAGS = -Wall -Wmissing-prototypes -Wmissing-declarations -D_GNU_SOURCE -I .. -I @PGSQL_INCLUDE_DIR@ +AM_CPPFLAGS = -pg -Wall -Wmissing-prototypes -Wmissing-declarations -D_GNU_SOURCE -I .. -I @PGSQL_INCLUDE_DIR@ AM_YFLAGS = -d all: all-am diff --git a/parser/gram.c b/parser/gram.c index e89774a97..67ea1b22b 100644 --- a/parser/gram.c +++ b/parser/gram.c @@ -1,9 +1,7 @@ -/* A Bison parser, made by GNU Bison 2.3. */ +/* A Bison parser, made by GNU Bison 2.1. */ -/* Skeleton implementation for Bison's Yacc-like parsers in C - - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 - Free Software Foundation, Inc. +/* Skeleton parser for Yacc-like parsing with Bison, + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,21 +18,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ +/* As a special exception, when this file is copied by Bison into a + Bison output file, you may use that output file without restriction. + This special exception was added by the Free Software Foundation + in version 1.24 of Bison. */ -/* C LALR(1) parser skeleton written by Richard Stallman, by - simplifying the original so-called "semantic" parser. */ +/* Written by Richard Stallman by simplifying the original so called + ``semantic'' parser. */ /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local @@ -47,7 +37,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.3" +#define YYBISON_VERSION "2.1" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -1017,10 +1007,9 @@ static DefElem *defWithOids(bool value); # define YYTOKEN_TABLE 0 #endif -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE +#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) #line 145 "gram.y" -{ +typedef union YYSTYPE { int ival; char chr; char *str; @@ -1051,16 +1040,15 @@ typedef union YYSTYPE InsertStmt *istmt; VariableSetStmt *vsetstmt; -} -/* Line 187 of yacc.c. */ -#line 1057 "gram.c" - YYSTYPE; +} YYSTYPE; +/* Line 196 of yacc.c. */ +#line 1046 "gram.c" # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 #endif -#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED +#if ! defined (YYLTYPE) && ! defined (YYLTYPE_IS_DECLARED) typedef struct YYLTYPE { int first_line; @@ -1077,56 +1065,23 @@ typedef struct YYLTYPE /* Copy the second part of user declarations. */ -/* Line 216 of yacc.c. */ -#line 1082 "gram.c" +/* Line 219 of yacc.c. */ +#line 1070 "gram.c" -#ifdef short -# undef short +#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) +# define YYSIZE_T __SIZE_TYPE__ #endif - -#ifdef YYTYPE_UINT8 -typedef YYTYPE_UINT8 yytype_uint8; -#else -typedef unsigned char yytype_uint8; +#if ! defined (YYSIZE_T) && defined (size_t) +# define YYSIZE_T size_t #endif - -#ifdef YYTYPE_INT8 -typedef YYTYPE_INT8 yytype_int8; -#elif (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -typedef signed char yytype_int8; -#else -typedef short int yytype_int8; -#endif - -#ifdef YYTYPE_UINT16 -typedef YYTYPE_UINT16 yytype_uint16; -#else -typedef unsigned short int yytype_uint16; -#endif - -#ifdef YYTYPE_INT16 -typedef YYTYPE_INT16 yytype_int16; -#else -typedef short int yytype_int16; +#if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus)) +# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t #endif - -#ifndef YYSIZE_T -# ifdef __SIZE_TYPE__ -# define YYSIZE_T __SIZE_TYPE__ -# elif defined size_t -# define YYSIZE_T size_t -# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# else -# define YYSIZE_T unsigned int -# endif +#if ! defined (YYSIZE_T) +# define YYSIZE_T unsigned int #endif -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) - #ifndef YY_ # if YYENABLE_NLS # if ENABLE_NLS @@ -1139,32 +1094,7 @@ typedef short int yytype_int16; # endif #endif -/* Suppress unused-variable warnings by "using" E. */ -#if ! defined lint || defined __GNUC__ -# define YYUSE(e) ((void) (e)) -#else -# define YYUSE(e) /* empty */ -#endif - -/* Identity function, used to suppress warnings about constant conditions. */ -#ifndef lint -# define YYID(n) (n) -#else -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static int -YYID (int i) -#else -static int -YYID (i) - int i; -#endif -{ - return i; -} -#endif - -#if ! defined yyoverflow || YYERROR_VERBOSE +#if ! defined (yyoverflow) || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ @@ -1172,77 +1102,65 @@ YYID (i) # if YYSTACK_USE_ALLOCA # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca -# elif defined __BUILTIN_VA_ARG_INCR -# include <alloca.h> /* INFRINGES ON USER NAME SPACE */ -# elif defined _AIX -# define YYSTACK_ALLOC __alloca -# elif defined _MSC_VER -# include <malloc.h> /* INFRINGES ON USER NAME SPACE */ -# define alloca _alloca # else # define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if defined (__STDC__) || defined (__cplusplus) # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 -# endif +# define YYINCLUDED_STDLIB_H # endif # endif # endif # endif # ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) + /* Pacify GCC's `empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely invoke alloca (N) if N exceeds 4096. Use a slightly smaller number to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */ # endif # else # define YYSTACK_ALLOC YYMALLOC # define YYSTACK_FREE YYFREE # ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1) # endif -# if (defined __cplusplus && ! defined _STDLIB_H \ - && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) -# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 -# endif +# ifdef __cplusplus +extern "C" { # endif # ifndef YYMALLOC # define YYMALLOC malloc -# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \ + && (defined (__STDC__) || defined (__cplusplus))) void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free -# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \ + && (defined (__STDC__) || defined (__cplusplus))) void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif +# ifdef __cplusplus +} +# endif # endif -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ +#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ -#if (! defined yyoverflow \ - && (! defined __cplusplus \ - || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ - && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) +#if (! defined (yyoverflow) \ + && (! defined (__cplusplus) \ + || (defined (YYLTYPE_IS_TRIVIAL) && YYLTYPE_IS_TRIVIAL \ + && defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { - yytype_int16 yyss; + short int yyss; YYSTYPE yyvs; YYLTYPE yyls; }; @@ -1253,13 +1171,13 @@ union yyalloc /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ + ((N) * (sizeof (short int) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ + 2 * YYSTACK_GAP_MAXIMUM) /* Copy COUNT objects from FROM to TO. The source and destination do not overlap. */ # ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ +# if defined (__GNUC__) && 1 < __GNUC__ # define YYCOPY(To, From, Count) \ __builtin_memcpy (To, From, (Count) * sizeof (*(From))) # else @@ -1270,7 +1188,7 @@ union yyalloc for (yyi = 0; yyi < (Count); yyi++) \ (To)[yyi] = (From)[yyi]; \ } \ - while (YYID (0)) + while (0) # endif # endif @@ -1288,22 +1206,28 @@ union yyalloc yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ - while (YYID (0)) + while (0) #endif -/* YYFINAL -- State number of the termination state. */ +#if defined (__STDC__) || defined (__cplusplus) + typedef signed char yysigned_char; +#else + typedef short int yysigned_char; +#endif + +/* YYFINAL -- State number of the termination state. */ #define YYFINAL 621 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 48561 -/* YYNTOKENS -- Number of terminals. */ +/* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 408 -/* YYNNTS -- Number of nonterminals. */ +/* YYNNTS -- Number of nonterminals. */ #define YYNNTS 427 -/* YYNRULES -- Number of rules. */ +/* YYNRULES -- Number of rules. */ #define YYNRULES 1812 -/* YYNRULES -- Number of states. */ +/* YYNRULES -- Number of states. */ #define YYNSTATES 3287 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ @@ -1314,7 +1238,7 @@ union yyalloc ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -static const yytype_uint16 yytranslate[] = +static const unsigned short int yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -1386,7 +1310,7 @@ static const yytype_uint16 yytranslate[] = #if YYDEBUG /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in YYRHS. */ -static const yytype_uint16 yyprhs[] = +static const unsigned short int yyprhs[] = { 0, 0, 3, 5, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, @@ -1572,8 +1496,8 @@ static const yytype_uint16 yyprhs[] = 5921, 5923, 5925 }; -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yytype_int16 yyrhs[] = +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const short int yyrhs[] = { 409, 0, -1, 410, -1, 410, 405, 411, -1, 411, -1, 650, -1, 651, -1, 656, -1, 607, -1, 424, @@ -2171,7 +2095,7 @@ static const yytype_int16 yyrhs[] = }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const yytype_uint16 yyrline[] = +static const unsigned short int yyrline[] = { 0, 538, 538, 542, 548, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, @@ -2360,7 +2284,7 @@ static const yytype_uint16 yyrline[] = #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { "$end", "error", "$undefined", "ABORT_P", "ABSOLUTE_P", "ACCESS", @@ -2544,7 +2468,7 @@ static const char *const yytname[] = # ifdef YYPRINT /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to token YYLEX-NUM. */ -static const yytype_uint16 yytoknum[] = +static const unsigned short int yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, @@ -2591,7 +2515,7 @@ static const yytype_uint16 yytoknum[] = # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint16 yyr1[] = +static const unsigned short int yyr1[] = { 0, 408, 409, 410, 410, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, @@ -2778,7 +2702,7 @@ static const yytype_uint16 yyr1[] = }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = +static const unsigned char yyr2[] = { 0, 2, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -2967,7 +2891,7 @@ static const yytype_uint8 yyr2[] = /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state STATE-NUM when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ -static const yytype_uint16 yydefact[] = +static const unsigned short int yydefact[] = { 96, 811, 417, 878, 877, 811, 213, 0, 868, 0, 811, 285, 300, 0, 0, 0, 0, 417, 811, 0, @@ -3300,8 +3224,8 @@ static const yytype_uint16 yydefact[] = 0, 772, 781, 441, 773, 0, 424 }; -/* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int16 yydefgoto[] = +/* YYDEFGOTO[NTERM-NUM]. */ +static const short int yydefgoto[] = { -1, 47, 48, 49, 50, 1000, 1590, 2057, 51, 52, 53, 54, 55, 56, 57, 58, 59, 1029, 60, 61, @@ -3685,7 +3609,7 @@ static const int yypact[] = }; /* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = +static const short int yypgoto[] = { -2901, -2901, -2901, 2004, -2901, -645, -444, -2901, -2901, -2901, -2901, -2901, -2901, -2901, -2901, -2901, -2901, -2901, -2901, -2901, @@ -3737,7 +3661,7 @@ static const yytype_int16 yypgoto[] = number is the opposite. If zero, do what YYDEFACT says. If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -1643 -static const yytype_int16 yytable[] = +static const short int yytable[] = { 142, 620, 681, 607, 141, 988, 1276, 1775, 819, 1079, 1782, 467, 1728, 546, 1674, 491, 747, 1333, 1390, 546, @@ -8598,7 +8522,7 @@ static const yytype_int16 yytable[] = 0, 526 }; -static const yytype_int16 yycheck[] = +static const short int yycheck[] = { 0, 46, 157, 41, 0, 631, 777, 1299, 561, 699, 1314, 11, 1253, 21, 1205, 12, 478, 823, 884, 27, @@ -13461,7 +13385,7 @@ static const yytype_int16 yycheck[] = /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ -static const yytype_uint16 yystos[] = +static const unsigned short int yystos[] = { 0, 3, 13, 15, 16, 29, 48, 50, 51, 55, 56, 65, 67, 83, 86, 92, 98, 104, 110, 116, @@ -13819,7 +13743,7 @@ do \ yychar = (Token); \ yylval = (Value); \ yytoken = YYTRANSLATE (yychar); \ - YYPOPSTACK (1); \ + YYPOPSTACK; \ goto yybackup; \ } \ else \ @@ -13827,7 +13751,7 @@ do \ yyerror (YY_("syntax error: cannot back up")); \ YYERROR; \ } \ -while (YYID (0)) +while (0) #define YYTERROR 1 @@ -13842,7 +13766,7 @@ while (YYID (0)) #ifndef YYLLOC_DEFAULT # define YYLLOC_DEFAULT(Current, Rhs, N) \ do \ - if (YYID (N)) \ + if (N) \ { \ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ @@ -13856,7 +13780,7 @@ while (YYID (0)) (Current).first_column = (Current).last_column = \ YYRHSLOC (Rhs, 0).last_column; \ } \ - while (YYID (0)) + while (0) #endif @@ -13868,8 +13792,8 @@ while (YYID (0)) # if YYLTYPE_IS_TRIVIAL # define YY_LOCATION_PRINT(File, Loc) \ fprintf (File, "%d.%d-%d.%d", \ - (Loc).first_line, (Loc).first_column, \ - (Loc).last_line, (Loc).last_column) + (Loc).first_line, (Loc).first_column, \ + (Loc).last_line, (Loc).last_column) # else # define YY_LOCATION_PRINT(File, Loc) ((void) 0) # endif @@ -13896,101 +13820,36 @@ while (YYID (0)) do { \ if (yydebug) \ YYFPRINTF Args; \ -} while (YYID (0)) - -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value, Location); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (YYID (0)) - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp) -#else -static void -yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; - YYLTYPE const * const yylocationp; -#endif -{ - if (!yyvaluep) - return; - YYUSE (yylocationp); -# ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# else - YYUSE (yyoutput); -# endif - switch (yytype) - { - default: - break; - } -} - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp) -#else -static void -yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; - YYLTYPE const * const yylocationp; -#endif -{ - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); +} while (0) - YY_LOCATION_PRINT (yyoutput, *yylocationp); - YYFPRINTF (yyoutput, ": "); - yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp); - YYFPRINTF (yyoutput, ")"); -} +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yysymprint (stderr, \ + Type, Value, Location); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) /*------------------------------------------------------------------. | yy_stack_print -- Print the state stack from its BOTTOM up to its | | TOP (included). | `------------------------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +#if defined (__STDC__) || defined (__cplusplus) static void -yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) +yy_stack_print (short int *bottom, short int *top) #else static void yy_stack_print (bottom, top) - yytype_int16 *bottom; - yytype_int16 *top; + short int *bottom; + short int *top; #endif { YYFPRINTF (stderr, "Stack now"); - for (; bottom <= top; ++bottom) + for (/* Nothing. */; bottom <= top; ++bottom) YYFPRINTF (stderr, " %d", *bottom); YYFPRINTF (stderr, "\n"); } @@ -13999,46 +13858,37 @@ yy_stack_print (bottom, top) do { \ if (yydebug) \ yy_stack_print ((Bottom), (Top)); \ -} while (YYID (0)) +} while (0) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +#if defined (__STDC__) || defined (__cplusplus) static void -yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule) +yy_reduce_print (int yyrule) #else static void -yy_reduce_print (yyvsp, yylsp, yyrule) - YYSTYPE *yyvsp; - YYLTYPE *yylsp; +yy_reduce_print (yyrule) int yyrule; #endif { - int yynrhs = yyr2[yyrule]; int yyi; unsigned long int yylno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); - /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) - { - fprintf (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &(yyvsp[(yyi + 1) - (yynrhs)]) - , &(yylsp[(yyi + 1) - (yynrhs)]) ); - fprintf (stderr, "\n"); - } + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ", + yyrule - 1, yylno); + /* Print the symbols being reduced, and their result. */ + for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) + YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]); + YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]); } # define YY_REDUCE_PRINT(Rule) \ do { \ if (yydebug) \ - yy_reduce_print (yyvsp, yylsp, Rule); \ -} while (YYID (0)) + yy_reduce_print (Rule); \ +} while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ @@ -14072,44 +13922,42 @@ int yydebug; #if YYERROR_VERBOSE # ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H +# if defined (__GLIBC__) && defined (_STRING_H) # define yystrlen strlen # else /* Return the length of YYSTR. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static YYSIZE_T +# if defined (__STDC__) || defined (__cplusplus) yystrlen (const char *yystr) -#else -static YYSIZE_T +# else yystrlen (yystr) - const char *yystr; -#endif + const char *yystr; +# endif { - YYSIZE_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) + const char *yys = yystr; + + while (*yys++ != '\0') continue; - return yylen; + + return yys - yystr - 1; } # endif # endif # ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) # define yystpcpy stpcpy # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static char * +# if defined (__STDC__) || defined (__cplusplus) yystpcpy (char *yydest, const char *yysrc) -#else -static char * +# else yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -#endif + char *yydest; + const char *yysrc; +# endif { char *yyd = yydest; const char *yys = yysrc; @@ -14135,7 +13983,7 @@ yytnamerr (char *yyres, const char *yystr) { if (*yystr == '"') { - YYSIZE_T yyn = 0; + size_t yyn = 0; char const *yyp = yystr; for (;;) @@ -14170,123 +14018,57 @@ yytnamerr (char *yyres, const char *yystr) } # endif -/* Copy into YYRESULT an error message about the unexpected token - YYCHAR while in state YYSTATE. Return the number of bytes copied, - including the terminating null byte. If YYRESULT is null, do not - copy anything; just return the number of bytes that would be - copied. As a special case, return 0 if an ordinary "syntax error" - message will do. Return YYSIZE_MAXIMUM if overflow occurs during - size calculation. */ -static YYSIZE_T -yysyntax_error (char *yyresult, int yystate, int yychar) +#endif /* YYERROR_VERBOSE */ + + + +#if YYDEBUG +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +#if defined (__STDC__) || defined (__cplusplus) +static void +yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp) +#else +static void +yysymprint (yyoutput, yytype, yyvaluep, yylocationp) + FILE *yyoutput; + int yytype; + YYSTYPE *yyvaluep; + YYLTYPE *yylocationp; +#endif { - int yyn = yypact[yystate]; + /* Pacify ``unused variable'' warnings. */ + (void) yyvaluep; + (void) yylocationp; - if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) - return 0; + if (yytype < YYNTOKENS) + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); else - { - int yytype = YYTRANSLATE (yychar); - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); - YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; - int yysize_overflow = 0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - int yyx; - -# if 0 - /* This is so xgettext sees the translatable formats that are - constructed on the fly. */ - YY_("syntax error, unexpected %s"); - YY_("syntax error, unexpected %s, expecting %s"); - YY_("syntax error, unexpected %s, expecting %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); -# endif - char *yyfmt; - char const *yyf; - static char const yyunexpected[] = "syntax error, unexpected %s"; - static char const yyexpecting[] = ", expecting %s"; - static char const yyor[] = " or %s"; - char yyformat[sizeof yyunexpected - + sizeof yyexpecting - 1 - + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) - * (sizeof yyor - 1))]; - char const *yyprefix = yyexpecting; - - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yycount = 1; - - yyarg[0] = yytname[yytype]; - yyfmt = yystpcpy (yyformat, yyunexpected); - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - yyformat[sizeof yyunexpected - 1] = '\0'; - break; - } - yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (0, yytname[yyx]); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; - yyfmt = yystpcpy (yyfmt, yyprefix); - yyprefix = yyor; - } - - yyf = YY_(yyformat); - yysize1 = yysize + yystrlen (yyf); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); - if (yysize_overflow) - return YYSIZE_MAXIMUM; + YY_LOCATION_PRINT (yyoutput, *yylocationp); + YYFPRINTF (yyoutput, ": "); - if (yyresult) - { - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - char *yyp = yyresult; - int yyi = 0; - while ((*yyp = *yyf) != '\0') - { - if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyf += 2; - } - else - { - yyp++; - yyf++; - } - } - } - return yysize; +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# endif + switch (yytype) + { + default: + break; } + YYFPRINTF (yyoutput, ")"); } -#endif /* YYERROR_VERBOSE */ - +#endif /* ! YYDEBUG */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +#if defined (__STDC__) || defined (__cplusplus) static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp) #else @@ -14298,8 +14080,9 @@ yydestruct (yymsg, yytype, yyvaluep, yylocationp) YYLTYPE *yylocationp; #endif { - YYUSE (yyvaluep); - YYUSE (yylocationp); + /* Pacify ``unused variable'' warnings. */ + (void) yyvaluep; + (void) yylocationp; if (!yymsg) yymsg = "Deleting"; @@ -14309,7 +14092,7 @@ yydestruct (yymsg, yytype, yyvaluep, yylocationp) { default: - break; + break; } } @@ -14317,13 +14100,13 @@ yydestruct (yymsg, yytype, yyvaluep, yylocationp) /* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus +# if defined (__STDC__) || defined (__cplusplus) int yyparse (void *YYPARSE_PARAM); -#else +# else int yyparse (); -#endif +# endif #else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus +#if defined (__STDC__) || defined (__cplusplus) int yyparse (void); #else int yyparse (); @@ -14350,24 +14133,20 @@ YYLTYPE yylloc; `----------*/ #ifdef YYPARSE_PARAM -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void *YYPARSE_PARAM) -#else -int -yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -#endif +# if defined (__STDC__) || defined (__cplusplus) +int yyparse (void *YYPARSE_PARAM) +# else +int yyparse (YYPARSE_PARAM) + void *YYPARSE_PARAM; +# endif #else /* ! YYPARSE_PARAM */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +#if defined (__STDC__) || defined (__cplusplus) int yyparse (void) #else int yyparse () - + ; #endif #endif { @@ -14379,12 +14158,6 @@ yyparse () int yyerrstatus; /* Look-ahead token as an internal (translated) token number. */ int yytoken = 0; -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif /* Three stacks and their tools: `yyss': related to states, @@ -14395,9 +14168,9 @@ yyparse () to reallocate them elsewhere. */ /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss = yyssa; - yytype_int16 *yyssp; + short int yyssa[YYINITDEPTH]; + short int *yyss = yyssa; + short int *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; @@ -14408,10 +14181,10 @@ yyparse () YYLTYPE yylsa[YYINITDEPTH]; YYLTYPE *yyls = yylsa; YYLTYPE *yylsp; - /* The locations where the error started and ended. */ + /* The locations where the error started and ended. */ YYLTYPE yyerror_range[2]; -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) +#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) YYSIZE_T yystacksize = YYINITDEPTH; @@ -14420,9 +14193,9 @@ yyparse () YYSTYPE yyval; YYLTYPE yyloc; - /* The number of symbols on the RHS of the reduced rule. - Keep to zero when no symbol should be popped. */ - int yylen = 0; + /* When reducing, the number of symbols on the RHS of the reduced + rule. */ + int yylen; YYDPRINTF ((stderr, "Starting parse\n")); @@ -14452,7 +14225,8 @@ yyparse () `------------------------------------------------------------*/ yynewstate: /* In all cases, when you get here, the value and location stacks - have just been pushed. So pushing a state here evens the stacks. */ + have just been pushed. so pushing a state here evens the stacks. + */ yyssp++; yysetstate: @@ -14465,11 +14239,11 @@ yyparse () #ifdef yyoverflow { - /* Give user a chance to reallocate the stack. Use copies of + /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; + short int *yyss1 = yyss; YYLTYPE *yyls1 = yyls; /* Each stack pointer address is followed by the size of the @@ -14497,7 +14271,7 @@ yyparse () yystacksize = YYMAXDEPTH; { - yytype_int16 *yyss1 = yyss; + short int *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) @@ -14532,10 +14306,12 @@ yyparse () `-----------*/ yybackup: - /* Do appropriate processing given the current state. Read a - look-ahead token if we need one and don't already have one. */ +/* Do appropriate processing given the current state. */ +/* Read a look-ahead token if we need one and don't already have one. */ +/* yyresume: */ /* First try to decide what to do without reference to look-ahead token. */ + yyn = yypact[yystate]; if (yyn == YYPACT_NINF) goto yydefault; @@ -14577,21 +14353,22 @@ yybackup: if (yyn == YYFINAL) YYACCEPT; - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; - /* Shift the look-ahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - /* Discard the shifted token unless it is eof. */ + /* Discard the token being shifted unless it is eof. */ if (yychar != YYEOF) yychar = YYEMPTY; - yystate = yyn; *++yyvsp = yylval; *++yylsp = yylloc; + + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; + + yystate = yyn; goto yynewstate; @@ -14622,29 +14399,29 @@ yyreduce: GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; - /* Default location. */ - YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); + /* Default location. */ + YYLLOC_DEFAULT (yyloc, yylsp - yylen, yylen); YY_REDUCE_PRINT (yyn); switch (yyn) { case 2: #line 538 "gram.y" - { parsetree = (yyvsp[(1) - (1)].list); } + { parsetree = (yyvsp[0].list); } break; case 3: #line 543 "gram.y" - { if ((yyvsp[(3) - (3)].node) != NULL) - (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); + { if ((yyvsp[0].node) != NULL) + (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].node)); else - (yyval.list) = (yyvsp[(1) - (3)].list); + (yyval.list) = (yyvsp[-2].list); } break; case 4: #line 549 "gram.y" - { if ((yyvsp[(1) - (1)].node) != NULL) - (yyval.list) = list_make1((yyvsp[(1) - (1)].node)); + { if ((yyvsp[0].node) != NULL) + (yyval.list) = list_make1((yyvsp[0].node)); else (yyval.list) = NIL; } @@ -14660,8 +14437,8 @@ yyreduce: { CreateRoleStmt *n = makeNode(CreateRoleStmt); n->stmt_type = ROLESTMT_ROLE; - n->role = (yyvsp[(3) - (5)].str); - n->options = (yyvsp[(5) - (5)].list); + n->role = (yyvsp[-2].str); + n->options = (yyvsp[0].list); (yyval.node) = (Node *)n; } break; @@ -14678,7 +14455,7 @@ yyreduce: case 100: #line 680 "gram.y" - { (yyval.list) = lappend((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].defelt)); } + { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].defelt)); } break; case 101: @@ -14690,7 +14467,7 @@ yyreduce: #line 686 "gram.y" { (yyval.defelt) = makeDefElem("password", - (Node *)makeString((yyvsp[(2) - (2)].str))); + (Node *)makeString((yyvsp[0].str))); } break; @@ -14705,7 +14482,7 @@ yyreduce: #line 695 "gram.y" { (yyval.defelt) = makeDefElem("encryptedPassword", - (Node *)makeString((yyvsp[(3) - (3)].str))); + (Node *)makeString((yyvsp[0].str))); } break; @@ -14713,7 +14490,7 @@ yyreduce: #line 700 "gram.y" { (yyval.defelt) = makeDefElem("unencryptedPassword", - (Node *)makeString((yyvsp[(3) - (3)].str))); + (Node *)makeString((yyvsp[0].str))); } break; @@ -14805,56 +14582,56 @@ yyreduce: case 118: #line 754 "gram.y" { - (yyval.defelt) = makeDefElem("connectionlimit", (Node *)makeInteger((yyvsp[(3) - (3)].ival))); + (yyval.defelt) = makeDefElem("connectionlimit", (Node *)makeInteger((yyvsp[0].ival))); } break; case 119: #line 758 "gram.y" { - (yyval.defelt) = makeDefElem("validUntil", (Node *)makeString((yyvsp[(3) - (3)].str))); + (yyval.defelt) = makeDefElem("validUntil", (Node *)makeString((yyvsp[0].str))); } break; case 120: #line 763 "gram.y" { - (yyval.defelt) = makeDefElem("rolemembers", (Node *)(yyvsp[(2) - (2)].list)); + (yyval.defelt) = makeDefElem("rolemembers", (Node *)(yyvsp[0].list)); } break; case 121: #line 768 "gram.y" { - (yyval.defelt) = makeDefElem("sysid", (Node *)makeInteger((yyvsp[(2) - (2)].ival))); + (yyval.defelt) = makeDefElem("sysid", (Node *)makeInteger((yyvsp[0].ival))); } break; case 122: #line 772 "gram.y" { - (yyval.defelt) = makeDefElem("adminmembers", (Node *)(yyvsp[(2) - (2)].list)); + (yyval.defelt) = makeDefElem("adminmembers", (Node *)(yyvsp[0].list)); } break; case 123: #line 776 "gram.y" { - (yyval.defelt) = makeDefElem("rolemembers", (Node *)(yyvsp[(2) - (2)].list)); + (yyval.defelt) = makeDefElem("rolemembers", (Node *)(yyvsp[0].list)); } break; case 124: #line 780 "gram.y" { - (yyval.defelt) = makeDefElem("addroleto", (Node *)(yyvsp[(3) - (3)].list)); + (yyval.defelt) = makeDefElem("addroleto", (Node *)(yyvsp[0].list)); } break; case 125: #line 784 "gram.y" { - (yyval.defelt) = makeDefElem("addroleto", (Node *)(yyvsp[(3) - (3)].list)); + (yyval.defelt) = makeDefElem("addroleto", (Node *)(yyvsp[0].list)); } break; @@ -14863,8 +14640,8 @@ yyreduce: { CreateRoleStmt *n = makeNode(CreateRoleStmt); n->stmt_type = ROLESTMT_USER; - n->role = (yyvsp[(3) - (5)].str); - n->options = (yyvsp[(5) - (5)].list); + n->role = (yyvsp[-2].str); + n->options = (yyvsp[0].list); (yyval.node) = (Node *)n; } break; @@ -14873,9 +14650,9 @@ yyreduce: #line 816 "gram.y" { AlterRoleStmt *n = makeNode(AlterRoleStmt); - n->role = (yyvsp[(3) - (5)].str); + n->role = (yyvsp[-2].str); n->action = +1; /* add, if there are members */ - n->options = (yyvsp[(5) - (5)].list); + n->options = (yyvsp[0].list); (yyval.node) = (Node *)n; } break; @@ -14884,8 +14661,8 @@ yyreduce: #line 827 "gram.y" { AlterRoleSetStmt *n = makeNode(AlterRoleSetStmt); - n->role = (yyvsp[(3) - (4)].str); - n->setstmt = (yyvsp[(4) - (4)].vsetstmt); + n->role = (yyvsp[-1].str); + n->setstmt = (yyvsp[0].vsetstmt); (yyval.node) = (Node *)n; } break; @@ -14894,9 +14671,9 @@ yyreduce: #line 844 "gram.y" { AlterRoleStmt *n = makeNode(AlterRoleStmt); - n->role = (yyvsp[(3) - (5)].str); + n->role = (yyvsp[-2].str); n->action = +1; /* add, if there are members */ - n->options = (yyvsp[(5) - (5)].list); + n->options = (yyvsp[0].list); (yyval.node) = (Node *)n; } break; @@ -14905,8 +14682,8 @@ yyreduce: #line 856 "gram.y" { AlterRoleSetStmt *n = makeNode(AlterRoleSetStmt); - n->role = (yyvsp[(3) - (4)].str); - n->setstmt = (yyvsp[(4) - (4)].vsetstmt); + n->role = (yyvsp[-1].str); + n->setstmt = (yyvsp[0].vsetstmt); (yyval.node) = (Node *)n; } break; @@ -14916,7 +14693,7 @@ yyreduce: { DropRoleStmt *n = makeNode(DropRoleStmt); n->missing_ok = FALSE; - n->roles = (yyvsp[(3) - (3)].list); + n->roles = (yyvsp[0].list); (yyval.node) = (Node *)n; } break; @@ -14926,7 +14703,7 @@ yyreduce: { DropRoleStmt *n = makeNode(DropRoleStmt); n->missing_ok = TRUE; - n->roles = (yyvsp[(5) - (5)].list); + n->roles = (yyvsp[0].list); (yyval.node) = (Node *)n; } break; @@ -14936,7 +14713,7 @@ yyreduce: { DropRoleStmt *n = makeNode(DropRoleStmt); n->missing_ok = FALSE; - n->roles = (yyvsp[(3) - (3)].list); + n->roles = (yyvsp[0].list); (yyval.node) = (Node *)n; } break; @@ -14945,7 +14722,7 @@ yyreduce: #line 909 "gram.y" { DropRoleStmt *n = makeNode(DropRoleStmt); - n->roles = (yyvsp[(5) - (5)].list); + n->roles = (yyvsp[0].list); n->missing_ok = TRUE; (yyval.node) = (Node *)n; } @@ -14956,8 +14733,8 @@ yyreduce: { CreateRoleStmt *n = makeNode(CreateRoleStmt); n->stmt_type = ROLESTMT_GROUP; - n->role = (yyvsp[(3) - (5)].str); - n->options = (yyvsp[(5) - (5)].list); + n->role = (yyvsp[-2].str); + n->options = (yyvsp[0].list); (yyval.node) = (Node *)n; } break; @@ -14966,10 +14743,10 @@ yyreduce: #line 944 "gram.y" { AlterRoleStmt *n = makeNode(AlterRoleStmt); - n->role = (yyvsp[(3) - (6)].str); - n->action = (yyvsp[(4) - (6)].ival); + n->role = (yyvsp[-3].str); + n->action = (yyvsp[-2].ival); n->options = list_make1(makeDefElem("rolemembers", - (Node *)(yyvsp[(6) - (6)].list))); + (Node *)(yyvsp[0].list))); (yyval.node) = (Node *)n; } break; @@ -14989,7 +14766,7 @@ yyreduce: { DropRoleStmt *n = makeNode(DropRoleStmt); n->missing_ok = FALSE; - n->roles = (yyvsp[(3) - (3)].list); + n->roles = (yyvsp[0].list); (yyval.node) = (Node *)n; } break; @@ -14999,7 +14776,7 @@ yyreduce: { DropRoleStmt *n = makeNode(DropRoleStmt); n->missing_ok = TRUE; - n->roles = (yyvsp[(5) - (5)].list); + n->roles = (yyvsp[0].list); (yyval.node) = (Node *)n; } break; @@ -15009,12 +14786,12 @@ yyreduce: { CreateSchemaStmt *n = makeNode(CreateSchemaStmt); /* One can omit the schema name or the authorization id. */ - if ((yyvsp[(3) - (6)].str) != NULL) - n->schemaname = (yyvsp[(3) - (6)].str); + if ((yyvsp[-3].str) != NULL) + n->schemaname = (yyvsp[-3].str); else - n->schemaname = (yyvsp[(5) - (6)].str); - n->authid = (yyvsp[(5) - (6)].str); - n->schemaElts = (yyvsp[(6) - (6)].list); + n->schemaname = (yyvsp[-1].str); + n->authid = (yyvsp[-1].str); + n->schemaElts = (yyvsp[0].list); (yyval.node) = (Node *)n; } break; @@ -15024,16 +14801,16 @@ yyreduce: { CreateSchemaStmt *n = makeNode(CreateSchemaStmt); /* ...but not both */ - n->schemaname = (yyvsp[(3) - (4)].str); + n->schemaname = (yyvsp[-1].str); n->authid = NULL; - n->schemaElts = (yyvsp[(4) - (4)].list); + n->schemaElts = (yyvsp[0].list); (yyval.node) = (Node *)n; } break; case 143: #line 1015 "gram.y" - { (yyval.str) = (yyvsp[(1) - (1)].str); } + { (yyval.str) = (yyvsp[0].str); } break; case 144: @@ -15043,7 +14820,7 @@ yyreduce: case 145: #line 1020 "gram.y" - { (yyval.list) = lappend((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].node)); } + { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].node)); } break; case 146: @@ -15054,7 +14831,7 @@ yyreduce: case 153: #line 1049 "gram.y" { - VariableSetStmt *n = (yyvsp[(2) - (2)].vsetstmt); + VariableSetStmt *n = (yyvsp[0].vsetstmt); n->is_local = false; (yyval.node) = (Node *) n; } @@ -15063,7 +14840,7 @@ yyreduce: case 154: #line 1055 "gram.y" { - VariableSetStmt *n = (yyvsp[(3) - (3)].vsetstmt); + VariableSetStmt *n = (yyvsp[0].vsetstmt); n->is_local = true; (yyval.node) = (Node *) n; } @@ -15072,7 +14849,7 @@ yyreduce: case 155: #line 1061 "gram.y" { - VariableSetStmt *n = (yyvsp[(3) - (3)].vsetstmt); + VariableSetStmt *n = (yyvsp[0].vsetstmt); n->is_local = false; (yyval.node) = (Node *) n; } @@ -15083,8 +14860,8 @@ yyreduce: { VariableSetStmt *n = makeNode(VariableSetStmt); n->kind = VAR_SET_VALUE; - n->name = (yyvsp[(1) - (3)].str); - n->args = (yyvsp[(3) - (3)].list); + n->name = (yyvsp[-2].str); + n->args = (yyvsp[0].list); (yyval.vsetstmt) = n; } break; @@ -15094,8 +14871,8 @@ yyreduce: { VariableSetStmt *n = makeNode(VariableSetStmt); n->kind = VAR_SET_VALUE; - n->name = (yyvsp[(1) - (3)].str); - n->args = (yyvsp[(3) - (3)].list); + n->name = (yyvsp[-2].str); + n->args = (yyvsp[0].list); (yyval.vsetstmt) = n; } break; @@ -15105,7 +14882,7 @@ yyreduce: { VariableSetStmt *n = makeNode(VariableSetStmt); n->kind = VAR_SET_DEFAULT; - n->name = (yyvsp[(1) - (3)].str); + n->name = (yyvsp[-2].str); (yyval.vsetstmt) = n; } break; @@ -15115,7 +14892,7 @@ yyreduce: { VariableSetStmt *n = makeNode(VariableSetStmt); n->kind = VAR_SET_DEFAULT; - n->name = (yyvsp[(1) - (3)].str); + n->name = (yyvsp[-2].str); (yyval.vsetstmt) = n; } break; @@ -15125,7 +14902,7 @@ yyreduce: { VariableSetStmt *n = makeNode(VariableSetStmt); n->kind = VAR_SET_CURRENT; - n->name = (yyvsp[(1) - (3)].str); + n->name = (yyvsp[-2].str); (yyval.vsetstmt) = n; } break; @@ -15136,8 +14913,8 @@ yyreduce: VariableSetStmt *n = makeNode(VariableSetStmt); n->kind = VAR_SET_VALUE; n->name = "timezone"; - if ((yyvsp[(3) - (3)].node) != NULL) - n->args = list_make1((yyvsp[(3) - (3)].node)); + if ((yyvsp[0].node) != NULL) + n->args = list_make1((yyvsp[0].node)); else n->kind = VAR_SET_DEFAULT; (yyval.vsetstmt) = n; @@ -15150,7 +14927,7 @@ yyreduce: VariableSetStmt *n = makeNode(VariableSetStmt); n->kind = VAR_SET_MULTI; n->name = "TRANSACTION"; - n->args = (yyvsp[(2) - (2)].list); + n->args = (yyvsp[0].list); (yyval.vsetstmt) = n; } break; @@ -15161,7 +14938,7 @@ yyreduce: VariableSetStmt *n = makeNode(VariableSetStmt); n->kind = VAR_SET_MULTI; n->name = "SESSION CHARACTERISTICS"; - n->args = (yyvsp[(5) - (5)].list); + n->args = (yyvsp[0].list); (yyval.vsetstmt) = n; } break; @@ -15172,8 +14949,8 @@ yyreduce: VariableSetStmt *n = makeNode(VariableSetStmt); n->kind = VAR_SET_VALUE; n->name = "client_encoding"; - if ((yyvsp[(2) - (2)].str) != NULL) - n->args = list_make1(makeStringConst((yyvsp[(2) - (2)].str), NULL)); + if ((yyvsp[0].str) != NULL) + n->args = list_make1(makeStringConst((yyvsp[0].str), NULL)); else n->kind = VAR_SET_DEFAULT; (yyval.vsetstmt) = n; @@ -15186,7 +14963,7 @@ yyreduce: VariableSetStmt *n = makeNode(VariableSetStmt); n->kind = VAR_SET_VALUE; n->name = "role"; - n->args = list_make1(makeStringConst((yyvsp[(2) - (2)].str), NULL)); + n->args = list_make1(makeStringConst((yyvsp[0].str), NULL)); (yyval.vsetstmt) = n; } break; @@ -15197,7 +14974,7 @@ yyreduce: VariableSetStmt *n = makeNode(VariableSetStmt); n->kind = VAR_SET_VALUE; n->name = "session_authorization"; - n->args = list_make1(makeStringConst((yyvsp[(3) - (3)].str), NULL)); + n->args = list_make1(makeStringConst((yyvsp[0].str), NULL)); (yyval.vsetstmt) = n; } break; @@ -15218,47 +14995,47 @@ yyreduce: VariableSetStmt *n = makeNode(VariableSetStmt); n->kind = VAR_SET_VALUE; n->name = "xmloption"; - n->args = list_make1(makeStringConst((yyvsp[(3) - (3)].ival) == XMLOPTION_DOCUMENT ? "DOCUMENT" : "CONTENT", NULL)); + n->args = list_make1(makeStringConst((yyvsp[0].ival) == XMLOPTION_DOCUMENT ? "DOCUMENT" : "CONTENT", NULL)); (yyval.vsetstmt) = n; } break; case 169: #line 1178 "gram.y" - { (yyval.str) = (yyvsp[(1) - (1)].str); } + { (yyval.str) = (yyvsp[0].str); } break; case 170: #line 1180 "gram.y" { - (yyval.str) = palloc(strlen((yyvsp[(1) - (3)].str)) + strlen((yyvsp[(3) - (3)].str)) + 2); - sprintf((yyval.str), "%s.%s", (yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].str)); + (yyval.str) = palloc(strlen((yyvsp[-2].str)) + strlen((yyvsp[0].str)) + 2); + sprintf((yyval.str), "%s.%s", (yyvsp[-2].str), (yyvsp[0].str)); } break; case 171: #line 1186 "gram.y" - { (yyval.list) = list_make1((yyvsp[(1) - (1)].node)); } + { (yyval.list) = list_make1((yyvsp[0].node)); } break; case 172: #line 1187 "gram.y" - { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); } + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].node)); } break; case 173: #line 1191 "gram.y" - { (yyval.node) = makeStringConst((yyvsp[(1) - (1)].str), NULL); } + { (yyval.node) = makeStringConst((yyvsp[0].str), NULL); } break; case 174: #line 1193 "gram.y" - { (yyval.node) = makeStringConst((yyvsp[(1) - (1)].str), NULL); } + { (yyval.node) = makeStringConst((yyvsp[0].str), NULL); } break; case 175: #line 1195 "gram.y" - { (yyval.node) = makeAConst((yyvsp[(1) - (1)].value)); } + { (yyval.node) = makeAConst((yyvsp[0].value)); } break; case 176: @@ -15304,28 +15081,28 @@ yyreduce: case 184: #line 1221 "gram.y" { - (yyval.node) = makeStringConst((yyvsp[(1) - (1)].str), NULL); + (yyval.node) = makeStringConst((yyvsp[0].str), NULL); } break; case 185: #line 1225 "gram.y" { - (yyval.node) = makeStringConst((yyvsp[(1) - (1)].str), NULL); + (yyval.node) = makeStringConst((yyvsp[0].str), NULL); } break; case 186: #line 1229 "gram.y" { - A_Const *n = (A_Const *) makeStringConst((yyvsp[(2) - (3)].str), (yyvsp[(1) - (3)].typnam)); - if ((yyvsp[(3) - (3)].ival) != INTERVAL_FULL_RANGE) + A_Const *n = (A_Const *) makeStringConst((yyvsp[-1].str), (yyvsp[-2].typnam)); + if ((yyvsp[0].ival) != INTERVAL_FULL_RANGE) { - if (((yyvsp[(3) - (3)].ival) & ~(INTERVAL_MASK(HOUR) | INTERVAL_MASK(MINUTE))) != 0) + if (((yyvsp[0].ival) & ~(INTERVAL_MASK(HOUR) | INTERVAL_MASK(MINUTE))) != 0) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), errmsg("time zone interval must be HOUR or HOUR TO MINUTE"))); - n->typename->typmods = list_make1(makeIntConst((yyvsp[(3) - (3)].ival))); + n->typename->typmods = list_make1(makeIntConst((yyvsp[0].ival))); } (yyval.node) = (Node *)n; } @@ -15334,21 +15111,21 @@ yyreduce: case 187: #line 1242 "gram.y" { - A_Const *n = (A_Const *) makeStringConst((yyvsp[(5) - (6)].str), (yyvsp[(1) - (6)].typnam)); - if (((yyvsp[(6) - (6)].ival) != INTERVAL_FULL_RANGE) - && (((yyvsp[(6) - (6)].ival) & ~(INTERVAL_MASK(HOUR) | INTERVAL_MASK(MINUTE))) != 0)) + A_Const *n = (A_Const *) makeStringConst((yyvsp[-1].str), (yyvsp[-5].typnam)); + if (((yyvsp[0].ival) != INTERVAL_FULL_RANGE) + && (((yyvsp[0].ival) & ~(INTERVAL_MASK(HOUR) | INTERVAL_MASK(MINUTE))) != 0)) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), errmsg("time zone interval must be HOUR or HOUR TO MINUTE"))); - n->typename->typmods = list_make2(makeIntConst((yyvsp[(6) - (6)].ival)), - makeIntConst((yyvsp[(3) - (6)].ival))); + n->typename->typmods = list_make2(makeIntConst((yyvsp[0].ival)), + makeIntConst((yyvsp[-3].ival))); (yyval.node) = (Node *)n; } break; case 188: #line 1253 "gram.y" - { (yyval.node) = makeAConst((yyvsp[(1) - (1)].value)); } + { (yyval.node) = makeAConst((yyvsp[0].value)); } break; case 189: @@ -15363,7 +15140,7 @@ yyreduce: case 191: #line 1259 "gram.y" - { (yyval.str) = (yyvsp[(1) - (1)].str); } + { (yyval.str) = (yyvsp[0].str); } break; case 192: @@ -15378,12 +15155,12 @@ yyreduce: case 194: #line 1265 "gram.y" - { (yyval.str) = (yyvsp[(1) - (1)].str); } + { (yyval.str) = (yyvsp[0].str); } break; case 195: #line 1266 "gram.y" - { (yyval.str) = (yyvsp[(1) - (1)].str); } + { (yyval.str) = (yyvsp[0].str); } break; case 196: @@ -15391,7 +15168,7 @@ yyreduce: { VariableSetStmt *n = makeNode(VariableSetStmt); n->kind = VAR_RESET; - n->name = (yyvsp[(2) - (2)].str); + n->name = (yyvsp[0].str); (yyval.node) = (Node *) n; } break; @@ -15437,19 +15214,19 @@ yyreduce: case 201: #line 1308 "gram.y" - { (yyval.vsetstmt) = (yyvsp[(2) - (2)].vsetstmt); } + { (yyval.vsetstmt) = (yyvsp[0].vsetstmt); } break; case 202: #line 1309 "gram.y" - { (yyval.vsetstmt) = (VariableSetStmt *) (yyvsp[(1) - (1)].node); } + { (yyval.vsetstmt) = (VariableSetStmt *) (yyvsp[0].node); } break; case 203: #line 1315 "gram.y" { VariableShowStmt *n = makeNode(VariableShowStmt); - n->name = (yyvsp[(2) - (2)].str); + n->name = (yyvsp[0].str); (yyval.node) = (Node *) n; } break; @@ -15494,8 +15271,8 @@ yyreduce: #line 1349 "gram.y" { ConstraintsSetStmt *n = makeNode(ConstraintsSetStmt); - n->constraints = (yyvsp[(3) - (4)].list); - n->deferred = (yyvsp[(4) - (4)].boolean); + n->constraints = (yyvsp[-1].list); + n->deferred = (yyvsp[0].boolean); (yyval.node) = (Node *) n; } break; @@ -15507,7 +15284,7 @@ yyreduce: case 210: #line 1359 "gram.y" - { (yyval.list) = (yyvsp[(1) - (1)].list); } + { (yyval.list) = (yyvsp[0].list); } break; case 211: @@ -15568,8 +15345,8 @@ yyreduce: #line 1422 "gram.y" { AlterTableStmt *n = makeNode(AlterTableStmt); - n->relation = (yyvsp[(3) - (4)].range); - n->cmds = (yyvsp[(4) - (4)].list); + n->relation = (yyvsp[-1].range); + n->cmds = (yyvsp[0].list); n->relkind = OBJECT_TABLE; (yyval.node) = (Node *)n; } @@ -15579,8 +15356,8 @@ yyreduce: #line 1430 "gram.y" { AlterTableStmt *n = makeNode(AlterTableStmt); - n->relation = (yyvsp[(3) - (4)].range); - n->cmds = (yyvsp[(4) - (4)].list); + n->relation = (yyvsp[-1].range); + n->cmds = (yyvsp[0].list); n->relkind = OBJECT_INDEX; (yyval.node) = (Node *)n; } @@ -15588,12 +15365,12 @@ yyreduce: case 220: #line 1440 "gram.y" - { (yyval.list) = list_make1((yyvsp[(1) - (1)].node)); } + { (yyval.list) = list_make1((yyvsp[0].node)); } break; case 221: #line 1441 "gram.y" - { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); } + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].node)); } break; case 222: @@ -15601,7 +15378,7 @@ yyreduce: { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_AddColumn; - n->def = (yyvsp[(3) - (3)].node); + n->def = (yyvsp[0].node); (yyval.node) = (Node *)n; } break; @@ -15611,8 +15388,8 @@ yyreduce: { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_ColumnDefault; - n->name = (yyvsp[(3) - (4)].str); - n->def = (yyvsp[(4) - (4)].node); + n->name = (yyvsp[-1].str); + n->def = (yyvsp[0].node); (yyval.node) = (Node *)n; } break; @@ -15622,7 +15399,7 @@ yyreduce: { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_DropNotNull; - n->name = (yyvsp[(3) - (6)].str); + n->name = (yyvsp[-3].str); (yyval.node) = (Node *)n; } break; @@ -15632,7 +15409,7 @@ yyreduce: { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_SetNotNull; - n->name = (yyvsp[(3) - (6)].str); + n->name = (yyvsp[-3].str); (yyval.node) = (Node *)n; } break; @@ -15642,8 +15419,8 @@ yyreduce: { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_SetStatistics; - n->name = (yyvsp[(3) - (6)].str); - n->def = (Node *) (yyvsp[(6) - (6)].value); + n->name = (yyvsp[-3].str); + n->def = (Node *) (yyvsp[0].value); (yyval.node) = (Node *)n; } break; @@ -15653,8 +15430,8 @@ yyreduce: { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_SetStorage; - n->name = (yyvsp[(3) - (6)].str); - n->def = (Node *) makeString((yyvsp[(6) - (6)].str)); + n->name = (yyvsp[-3].str); + n->def = (Node *) makeString((yyvsp[0].str)); (yyval.node) = (Node *)n; } break; @@ -15664,8 +15441,8 @@ yyreduce: { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_DropColumn; - n->name = (yyvsp[(3) - (4)].str); - n->behavior = (yyvsp[(4) - (4)].dbehavior); + n->name = (yyvsp[-1].str); + n->behavior = (yyvsp[0].dbehavior); (yyval.node) = (Node *)n; } break; @@ -15675,9 +15452,9 @@ yyreduce: { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_AlterColumnType; - n->name = (yyvsp[(3) - (6)].str); - n->def = (Node *) (yyvsp[(5) - (6)].typnam); - n->transform = (yyvsp[(6) - (6)].node); + n->name = (yyvsp[-3].str); + n->def = (Node *) (yyvsp[-1].typnam); + n->transform = (yyvsp[0].node); (yyval.node) = (Node *)n; } break; @@ -15687,7 +15464,7 @@ yyreduce: { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_AddConstraint; - n->def = (yyvsp[(2) - (2)].node); + n->def = (yyvsp[0].node); (yyval.node) = (Node *)n; } break; @@ -15697,8 +15474,8 @@ yyreduce: { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_DropConstraint; - n->name = (yyvsp[(3) - (4)].str); - n->behavior = (yyvsp[(4) - (4)].dbehavior); + n->name = (yyvsp[-1].str); + n->behavior = (yyvsp[0].dbehavior); (yyval.node) = (Node *)n; } break; @@ -15717,7 +15494,7 @@ yyreduce: { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_ClusterOn; - n->name = (yyvsp[(3) - (3)].str); + n->name = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -15737,7 +15514,7 @@ yyreduce: { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_EnableTrig; - n->name = (yyvsp[(3) - (3)].str); + n->name = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -15747,7 +15524,7 @@ yyreduce: { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_EnableAlwaysTrig; - n->name = (yyvsp[(4) - (4)].str); + n->name = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -15757,7 +15534,7 @@ yyreduce: { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_EnableReplicaTrig; - n->name = (yyvsp[(4) - (4)].str); + n->name = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -15785,7 +15562,7 @@ yyreduce: { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_DisableTrig; - n->name = (yyvsp[(3) - (3)].str); + n->name = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -15813,7 +15590,7 @@ yyreduce: { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_EnableRule; - n->name = (yyvsp[(3) - (3)].str); + n->name = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -15823,7 +15600,7 @@ yyreduce: { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_EnableAlwaysRule; - n->name = (yyvsp[(4) - (4)].str); + n->name = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -15833,7 +15610,7 @@ yyreduce: { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_EnableReplicaRule; - n->name = (yyvsp[(4) - (4)].str); + n->name = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -15843,7 +15620,7 @@ yyreduce: { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_DisableRule; - n->name = (yyvsp[(3) - (3)].str); + n->name = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -15853,7 +15630,7 @@ yyreduce: { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_AddInherit; - n->def = (Node *) (yyvsp[(2) - (2)].range); + n->def = (Node *) (yyvsp[0].range); (yyval.node) = (Node *)n; } break; @@ -15863,7 +15640,7 @@ yyreduce: { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_DropInherit; - n->def = (Node *) (yyvsp[(3) - (3)].range); + n->def = (Node *) (yyvsp[0].range); (yyval.node) = (Node *)n; } break; @@ -15871,18 +15648,18 @@ yyreduce: case 249: #line 1668 "gram.y" { - (yyval.node) = (yyvsp[(1) - (1)].node); + (yyval.node) = (yyvsp[0].node); } break; case 250: #line 1674 "gram.y" - { (yyval.list) = list_make1((yyvsp[(1) - (1)].node)); } + { (yyval.list) = list_make1((yyvsp[0].node)); } break; case 251: #line 1675 "gram.y" - { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); } + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].node)); } break; case 252: @@ -15890,7 +15667,7 @@ yyreduce: { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_ChangeOwner; - n->name = (yyvsp[(3) - (3)].str); + n->name = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -15900,7 +15677,7 @@ yyreduce: { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_SetTableSpace; - n->name = (yyvsp[(3) - (3)].str); + n->name = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -15910,7 +15687,7 @@ yyreduce: { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_SetRelOptions; - n->def = (Node *)(yyvsp[(2) - (2)].list); + n->def = (Node *)(yyvsp[0].list); (yyval.node) = (Node *)n; } break; @@ -15920,7 +15697,7 @@ yyreduce: { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_ResetRelOptions; - n->def = (Node *)(yyvsp[(2) - (2)].list); + n->def = (Node *)(yyvsp[0].list); (yyval.node) = (Node *)n; } break; @@ -15929,10 +15706,10 @@ yyreduce: #line 1716 "gram.y" { /* Treat SET DEFAULT NULL the same as DROP DEFAULT */ - if (exprIsNullConstant((yyvsp[(3) - (3)].node))) + if (exprIsNullConstant((yyvsp[0].node))) (yyval.node) = NULL; else - (yyval.node) = (yyvsp[(3) - (3)].node); + (yyval.node) = (yyvsp[0].node); } break; @@ -15958,7 +15735,7 @@ yyreduce: case 261: #line 1733 "gram.y" - { (yyval.node) = (yyvsp[(2) - (2)].node); } + { (yyval.node) = (yyvsp[0].node); } break; case 262: @@ -15970,7 +15747,7 @@ yyreduce: #line 1748 "gram.y" { ClosePortalStmt *n = makeNode(ClosePortalStmt); - n->portalname = (yyvsp[(2) - (2)].str); + n->portalname = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -15988,22 +15765,22 @@ yyreduce: #line 1778 "gram.y" { CopyStmt *n = makeNode(CopyStmt); - n->relation = (yyvsp[(3) - (10)].range); + n->relation = (yyvsp[-7].range); n->query = NULL; - n->attlist = (yyvsp[(4) - (10)].list); - n->is_from = (yyvsp[(6) - (10)].boolean); - n->filename = (yyvsp[(7) - (10)].str); + n->attlist = (yyvsp[-6].list); + n->is_from = (yyvsp[-4].boolean); + n->filename = (yyvsp[-3].str); n->options = NIL; /* Concatenate user-supplied flags */ - if ((yyvsp[(2) - (10)].defelt)) - n->options = lappend(n->options, (yyvsp[(2) - (10)].defelt)); - if ((yyvsp[(5) - (10)].defelt)) - n->options = lappend(n->options, (yyvsp[(5) - (10)].defelt)); - if ((yyvsp[(8) - (10)].defelt)) - n->options = lappend(n->options, (yyvsp[(8) - (10)].defelt)); - if ((yyvsp[(10) - (10)].list)) - n->options = list_concat(n->options, (yyvsp[(10) - (10)].list)); + if ((yyvsp[-8].defelt)) + n->options = lappend(n->options, (yyvsp[-8].defelt)); + if ((yyvsp[-5].defelt)) + n->options = lappend(n->options, (yyvsp[-5].defelt)); + if ((yyvsp[-2].defelt)) + n->options = lappend(n->options, (yyvsp[-2].defelt)); + if ((yyvsp[0].list)) + n->options = list_concat(n->options, (yyvsp[0].list)); (yyval.node) = (Node *)n; } break; @@ -16013,11 +15790,11 @@ yyreduce: { CopyStmt *n = makeNode(CopyStmt); n->relation = NULL; - n->query = (yyvsp[(2) - (6)].node); + n->query = (yyvsp[-4].node); n->attlist = NIL; n->is_from = false; - n->filename = (yyvsp[(4) - (6)].str); - n->options = (yyvsp[(6) - (6)].list); + n->filename = (yyvsp[-2].str); + n->options = (yyvsp[0].list); (yyval.node) = (Node *)n; } break; @@ -16034,7 +15811,7 @@ yyreduce: case 269: #line 1823 "gram.y" - { (yyval.str) = (yyvsp[(1) - (1)].str); } + { (yyval.str) = (yyvsp[0].str); } break; case 270: @@ -16049,7 +15826,7 @@ yyreduce: case 272: #line 1831 "gram.y" - { (yyval.list) = lappend((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].defelt)); } + { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].defelt)); } break; case 273: @@ -16074,14 +15851,14 @@ yyreduce: case 276: #line 1846 "gram.y" { - (yyval.defelt) = makeDefElem("delimiter", (Node *)makeString((yyvsp[(3) - (3)].str))); + (yyval.defelt) = makeDefElem("delimiter", (Node *)makeString((yyvsp[0].str))); } break; case 277: #line 1850 "gram.y" { - (yyval.defelt) = makeDefElem("null", (Node *)makeString((yyvsp[(3) - (3)].str))); + (yyval.defelt) = makeDefElem("null", (Node *)makeString((yyvsp[0].str))); } break; @@ -16102,28 +15879,28 @@ yyreduce: case 280: #line 1862 "gram.y" { - (yyval.defelt) = makeDefElem("quote", (Node *)makeString((yyvsp[(3) - (3)].str))); + (yyval.defelt) = makeDefElem("quote", (Node *)makeString((yyvsp[0].str))); } break; case 281: #line 1866 "gram.y" { - (yyval.defelt) = makeDefElem("escape", (Node *)makeString((yyvsp[(3) - (3)].str))); + (yyval.defelt) = makeDefElem("escape", (Node *)makeString((yyvsp[0].str))); } break; case 282: #line 1870 "gram.y" { - (yyval.defelt) = makeDefElem("force_quote", (Node *)(yyvsp[(3) - (3)].list)); + (yyval.defelt) = makeDefElem("force_quote", (Node *)(yyvsp[0].list)); } break; case 283: #line 1874 "gram.y" { - (yyval.defelt) = makeDefElem("force_notnull", (Node *)(yyvsp[(4) - (4)].list)); + (yyval.defelt) = makeDefElem("force_notnull", (Node *)(yyvsp[0].list)); } break; @@ -16154,7 +15931,7 @@ yyreduce: case 288: #line 1900 "gram.y" { - (yyval.defelt) = makeDefElem("delimiter", (Node *)makeString((yyvsp[(3) - (3)].str))); + (yyval.defelt) = makeDefElem("delimiter", (Node *)makeString((yyvsp[0].str))); } break; @@ -16177,14 +15954,14 @@ yyreduce: #line 1921 "gram.y" { CreateStmt *n = makeNode(CreateStmt); - (yyvsp[(4) - (11)].range)->istemp = (yyvsp[(2) - (11)].boolean); - n->relation = (yyvsp[(4) - (11)].range); - n->tableElts = (yyvsp[(6) - (11)].list); - n->inhRelations = (yyvsp[(8) - (11)].list); + (yyvsp[-7].range)->istemp = (yyvsp[-9].boolean); + n->relation = (yyvsp[-7].range); + n->tableElts = (yyvsp[-5].list); + n->inhRelations = (yyvsp[-3].list); n->constraints = NIL; - n->options = (yyvsp[(9) - (11)].list); - n->oncommit = (yyvsp[(10) - (11)].oncommit); - n->tablespacename = (yyvsp[(11) - (11)].str); + n->options = (yyvsp[-2].list); + n->oncommit = (yyvsp[-1].oncommit); + n->tablespacename = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -16196,14 +15973,14 @@ yyreduce: * by our inheritance capabilities. Let's try it... */ CreateStmt *n = makeNode(CreateStmt); - (yyvsp[(4) - (12)].range)->istemp = (yyvsp[(2) - (12)].boolean); - n->relation = (yyvsp[(4) - (12)].range); - n->tableElts = (yyvsp[(8) - (12)].list); - n->inhRelations = list_make1((yyvsp[(6) - (12)].range)); + (yyvsp[-8].range)->istemp = (yyvsp[-10].boolean); + n->relation = (yyvsp[-8].range); + n->tableElts = (yyvsp[-4].list); + n->inhRelations = list_make1((yyvsp[-6].range)); n->constraints = NIL; - n->options = (yyvsp[(10) - (12)].list); - n->oncommit = (yyvsp[(11) - (12)].oncommit); - n->tablespacename = (yyvsp[(12) - (12)].str); + n->options = (yyvsp[-2].list); + n->oncommit = (yyvsp[-1].oncommit); + n->tablespacename = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -16245,7 +16022,7 @@ yyreduce: case 301: #line 1969 "gram.y" - { (yyval.list) = (yyvsp[(1) - (1)].list); } + { (yyval.list) = (yyvsp[0].list); } break; case 302: @@ -16256,39 +16033,39 @@ yyreduce: case 303: #line 1975 "gram.y" { - (yyval.list) = list_make1((yyvsp[(1) - (1)].node)); + (yyval.list) = list_make1((yyvsp[0].node)); } break; case 304: #line 1979 "gram.y" { - (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); + (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].node)); } break; case 305: #line 1985 "gram.y" - { (yyval.node) = (yyvsp[(1) - (1)].node); } + { (yyval.node) = (yyvsp[0].node); } break; case 306: #line 1986 "gram.y" - { (yyval.node) = (yyvsp[(1) - (1)].node); } + { (yyval.node) = (yyvsp[0].node); } break; case 307: #line 1987 "gram.y" - { (yyval.node) = (yyvsp[(1) - (1)].node); } + { (yyval.node) = (yyvsp[0].node); } break; case 308: #line 1991 "gram.y" { ColumnDef *n = makeNode(ColumnDef); - n->colname = (yyvsp[(1) - (3)].str); - n->typename = (yyvsp[(2) - (3)].typnam); - n->constraints = (yyvsp[(3) - (3)].list); + n->colname = (yyvsp[-2].str); + n->typename = (yyvsp[-1].typnam); + n->constraints = (yyvsp[0].list); n->is_local = true; (yyval.node) = (Node *)n; } @@ -16296,7 +16073,7 @@ yyreduce: case 309: #line 2002 "gram.y" - { (yyval.list) = lappend((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].node)); } + { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].node)); } break; case 310: @@ -16307,35 +16084,35 @@ yyreduce: case 311: #line 2008 "gram.y" { - switch (nodeTag((yyvsp[(3) - (3)].node))) + switch (nodeTag((yyvsp[0].node))) { case T_Constraint: { - Constraint *n = (Constraint *)(yyvsp[(3) - (3)].node); - n->name = (yyvsp[(2) - (3)].str); + Constraint *n = (Constraint *)(yyvsp[0].node); + n->name = (yyvsp[-1].str); } break; case T_FkConstraint: { - FkConstraint *n = (FkConstraint *)(yyvsp[(3) - (3)].node); - n->constr_name = (yyvsp[(2) - (3)].str); + FkConstraint *n = (FkConstraint *)(yyvsp[0].node); + n->constr_name = (yyvsp[-1].str); } break; default: break; } - (yyval.node) = (yyvsp[(3) - (3)].node); + (yyval.node) = (yyvsp[0].node); } break; case 312: #line 2028 "gram.y" - { (yyval.node) = (yyvsp[(1) - (1)].node); } + { (yyval.node) = (yyvsp[0].node); } break; case 313: #line 2029 "gram.y" - { (yyval.node) = (yyvsp[(1) - (1)].node); } + { (yyval.node) = (yyvsp[0].node); } break; case 314: @@ -16375,8 +16152,8 @@ yyreduce: n->raw_expr = NULL; n->cooked_expr = NULL; n->keys = NULL; - n->options = (yyvsp[(2) - (3)].list); - n->indexspace = (yyvsp[(3) - (3)].str); + n->options = (yyvsp[-1].list); + n->indexspace = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -16390,8 +16167,8 @@ yyreduce: n->raw_expr = NULL; n->cooked_expr = NULL; n->keys = NULL; - n->options = (yyvsp[(3) - (4)].list); - n->indexspace = (yyvsp[(4) - (4)].str); + n->options = (yyvsp[-1].list); + n->indexspace = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -16402,7 +16179,7 @@ yyreduce: Constraint *n = makeNode(Constraint); n->contype = CONSTR_CHECK; n->name = NULL; - n->raw_expr = (yyvsp[(3) - (4)].node); + n->raw_expr = (yyvsp[-1].node); n->cooked_expr = NULL; n->keys = NULL; n->indexspace = NULL; @@ -16416,14 +16193,14 @@ yyreduce: Constraint *n = makeNode(Constraint); n->contype = CONSTR_DEFAULT; n->name = NULL; - if (exprIsNullConstant((yyvsp[(2) - (2)].node))) + if (exprIsNullConstant((yyvsp[0].node))) { /* DEFAULT NULL should be reported as empty expr */ n->raw_expr = NULL; } else { - n->raw_expr = (yyvsp[(2) - (2)].node); + n->raw_expr = (yyvsp[0].node); } n->cooked_expr = NULL; n->keys = NULL; @@ -16437,12 +16214,12 @@ yyreduce: { FkConstraint *n = makeNode(FkConstraint); n->constr_name = NULL; - n->pktable = (yyvsp[(2) - (5)].range); + n->pktable = (yyvsp[-3].range); n->fk_attrs = NIL; - n->pk_attrs = (yyvsp[(3) - (5)].list); - n->fk_matchtype = (yyvsp[(4) - (5)].ival); - n->fk_upd_action = (char) ((yyvsp[(5) - (5)].ival) >> 8); - n->fk_del_action = (char) ((yyvsp[(5) - (5)].ival) & 0xFF); + n->pk_attrs = (yyvsp[-2].list); + n->fk_matchtype = (yyvsp[-1].ival); + n->fk_upd_action = (char) ((yyvsp[0].ival) >> 8); + n->fk_del_action = (char) ((yyvsp[0].ival) & 0xFF); n->deferrable = FALSE; n->initdeferred = FALSE; (yyval.node) = (Node *)n; @@ -16489,15 +16266,15 @@ yyreduce: #line 2190 "gram.y" { InhRelation *n = makeNode(InhRelation); - n->relation = (yyvsp[(2) - (3)].range); - n->options = (yyvsp[(3) - (3)].list); + n->relation = (yyvsp[-1].range); + n->options = (yyvsp[0].list); (yyval.node) = (Node *)n; } break; case 326: #line 2199 "gram.y" - { (yyval.list) = lappend_int((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].ival)); } + { (yyval.list) = lappend_int((yyvsp[-1].list), (yyvsp[0].ival)); } break; case 327: @@ -16538,30 +16315,30 @@ yyreduce: case 334: #line 2219 "gram.y" { - switch (nodeTag((yyvsp[(3) - (3)].node))) + switch (nodeTag((yyvsp[0].node))) { case T_Constraint: { - Constraint *n = (Constraint *)(yyvsp[(3) - (3)].node); - n->name = (yyvsp[(2) - (3)].str); + Constraint *n = (Constraint *)(yyvsp[0].node); + n->name = (yyvsp[-1].str); } break; case T_FkConstraint: { - FkConstraint *n = (FkConstraint *)(yyvsp[(3) - (3)].node); - n->constr_name = (yyvsp[(2) - (3)].str); + FkConstraint *n = (FkConstraint *)(yyvsp[0].node); + n->constr_name = (yyvsp[-1].str); } break; default: break; } - (yyval.node) = (yyvsp[(3) - (3)].node); + (yyval.node) = (yyvsp[0].node); } break; case 335: #line 2239 "gram.y" - { (yyval.node) = (yyvsp[(1) - (1)].node); } + { (yyval.node) = (yyvsp[0].node); } break; case 336: @@ -16570,7 +16347,7 @@ yyreduce: Constraint *n = makeNode(Constraint); n->contype = CONSTR_CHECK; n->name = NULL; - n->raw_expr = (yyvsp[(3) - (4)].node); + n->raw_expr = (yyvsp[-1].node); n->cooked_expr = NULL; n->indexspace = NULL; (yyval.node) = (Node *)n; @@ -16585,9 +16362,9 @@ yyreduce: n->name = NULL; n->raw_expr = NULL; n->cooked_expr = NULL; - n->keys = (yyvsp[(3) - (6)].list); - n->options = (yyvsp[(5) - (6)].list); - n->indexspace = (yyvsp[(6) - (6)].str); + n->keys = (yyvsp[-3].list); + n->options = (yyvsp[-1].list); + n->indexspace = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -16600,9 +16377,9 @@ yyreduce: n->name = NULL; n->raw_expr = NULL; n->cooked_expr = NULL; - n->keys = (yyvsp[(4) - (7)].list); - n->options = (yyvsp[(6) - (7)].list); - n->indexspace = (yyvsp[(7) - (7)].str); + n->keys = (yyvsp[-3].list); + n->options = (yyvsp[-1].list); + n->indexspace = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -16612,21 +16389,21 @@ yyreduce: { FkConstraint *n = makeNode(FkConstraint); n->constr_name = NULL; - n->pktable = (yyvsp[(7) - (11)].range); - n->fk_attrs = (yyvsp[(4) - (11)].list); - n->pk_attrs = (yyvsp[(8) - (11)].list); - n->fk_matchtype = (yyvsp[(9) - (11)].ival); - n->fk_upd_action = (char) ((yyvsp[(10) - (11)].ival) >> 8); - n->fk_del_action = (char) ((yyvsp[(10) - (11)].ival) & 0xFF); - n->deferrable = ((yyvsp[(11) - (11)].ival) & 1) != 0; - n->initdeferred = ((yyvsp[(11) - (11)].ival) & 2) != 0; + n->pktable = (yyvsp[-4].range); + n->fk_attrs = (yyvsp[-7].list); + n->pk_attrs = (yyvsp[-3].list); + n->fk_matchtype = (yyvsp[-2].ival); + n->fk_upd_action = (char) ((yyvsp[-1].ival) >> 8); + n->fk_del_action = (char) ((yyvsp[-1].ival) & 0xFF); + n->deferrable = ((yyvsp[0].ival) & 1) != 0; + n->initdeferred = ((yyvsp[0].ival) & 2) != 0; (yyval.node) = (Node *)n; } break; case 340: #line 2295 "gram.y" - { (yyval.list) = (yyvsp[(2) - (3)].list); } + { (yyval.list) = (yyvsp[-1].list); } break; case 341: @@ -16636,18 +16413,18 @@ yyreduce: case 342: #line 2300 "gram.y" - { (yyval.list) = list_make1((yyvsp[(1) - (1)].node)); } + { (yyval.list) = list_make1((yyvsp[0].node)); } break; case 343: #line 2301 "gram.y" - { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); } + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].node)); } break; case 344: #line 2305 "gram.y" { - (yyval.node) = (Node *) makeString((yyvsp[(1) - (1)].str)); + (yyval.node) = (Node *) makeString((yyvsp[0].str)); } break; @@ -16684,22 +16461,22 @@ yyreduce: case 349: #line 2339 "gram.y" - { (yyval.ival) = ((yyvsp[(1) - (1)].ival) << 8) | (FKCONSTR_ACTION_NOACTION & 0xFF); } + { (yyval.ival) = ((yyvsp[0].ival) << 8) | (FKCONSTR_ACTION_NOACTION & 0xFF); } break; case 350: #line 2341 "gram.y" - { (yyval.ival) = (FKCONSTR_ACTION_NOACTION << 8) | ((yyvsp[(1) - (1)].ival) & 0xFF); } + { (yyval.ival) = (FKCONSTR_ACTION_NOACTION << 8) | ((yyvsp[0].ival) & 0xFF); } break; case 351: #line 2343 "gram.y" - { (yyval.ival) = ((yyvsp[(1) - (2)].ival) << 8) | ((yyvsp[(2) - (2)].ival) & 0xFF); } + { (yyval.ival) = ((yyvsp[-1].ival) << 8) | ((yyvsp[0].ival) & 0xFF); } break; case 352: #line 2345 "gram.y" - { (yyval.ival) = ((yyvsp[(2) - (2)].ival) << 8) | ((yyvsp[(1) - (2)].ival) & 0xFF); } + { (yyval.ival) = ((yyvsp[0].ival) << 8) | ((yyvsp[-1].ival) & 0xFF); } break; case 353: @@ -16709,12 +16486,12 @@ yyreduce: case 354: #line 2350 "gram.y" - { (yyval.ival) = (yyvsp[(3) - (3)].ival); } + { (yyval.ival) = (yyvsp[0].ival); } break; case 355: #line 2353 "gram.y" - { (yyval.ival) = (yyvsp[(3) - (3)].ival); } + { (yyval.ival) = (yyvsp[0].ival); } break; case 356: @@ -16744,7 +16521,7 @@ yyreduce: case 361: #line 2364 "gram.y" - { (yyval.list) = (yyvsp[(3) - (4)].list); } + { (yyval.list) = (yyvsp[-1].list); } break; case 362: @@ -16754,7 +16531,7 @@ yyreduce: case 363: #line 2370 "gram.y" - { (yyval.list) = (yyvsp[(2) - (2)].list); } + { (yyval.list) = (yyvsp[0].list); } break; case 364: @@ -16794,7 +16571,7 @@ yyreduce: case 371: #line 2382 "gram.y" - { (yyval.str) = (yyvsp[(2) - (2)].str); } + { (yyval.str) = (yyvsp[0].str); } break; case 372: @@ -16804,7 +16581,7 @@ yyreduce: case 373: #line 2386 "gram.y" - { (yyval.str) = (yyvsp[(4) - (4)].str); } + { (yyval.str) = (yyvsp[0].str); } break; case 374: @@ -16822,14 +16599,14 @@ yyreduce: * to find it. Similarly, the output column names must * be attached to that Select's target list. */ - SelectStmt *n = findLeftmostSelect((SelectStmt *) (yyvsp[(6) - (6)].node)); + SelectStmt *n = findLeftmostSelect((SelectStmt *) (yyvsp[0].node)); if (n->intoClause != NULL) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), errmsg("CREATE TABLE AS cannot specify INTO"))); - (yyvsp[(4) - (6)].into)->rel->istemp = (yyvsp[(2) - (6)].boolean); - n->intoClause = (yyvsp[(4) - (6)].into); - (yyval.node) = (yyvsp[(6) - (6)].node); + (yyvsp[-2].into)->rel->istemp = (yyvsp[-4].boolean); + n->intoClause = (yyvsp[-2].into); + (yyval.node) = (yyvsp[0].node); } break; @@ -16837,17 +16614,17 @@ yyreduce: #line 2419 "gram.y" { (yyval.into) = makeNode(IntoClause); - (yyval.into)->rel = (yyvsp[(1) - (5)].range); - (yyval.into)->colNames = (yyvsp[(2) - (5)].list); - (yyval.into)->options = (yyvsp[(3) - (5)].list); - (yyval.into)->onCommit = (yyvsp[(4) - (5)].oncommit); - (yyval.into)->tableSpaceName = (yyvsp[(5) - (5)].str); + (yyval.into)->rel = (yyvsp[-4].range); + (yyval.into)->colNames = (yyvsp[-3].list); + (yyval.into)->options = (yyvsp[-2].list); + (yyval.into)->onCommit = (yyvsp[-1].oncommit); + (yyval.into)->tableSpaceName = (yyvsp[0].str); } break; case 377: #line 2430 "gram.y" - { (yyval.list) = (yyvsp[(2) - (3)].list); } + { (yyval.list) = (yyvsp[-1].list); } break; case 378: @@ -16857,19 +16634,19 @@ yyreduce: case 379: #line 2435 "gram.y" - { (yyval.list) = list_make1((yyvsp[(1) - (1)].node)); } + { (yyval.list) = list_make1((yyvsp[0].node)); } break; case 380: #line 2436 "gram.y" - { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); } + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].node)); } break; case 381: #line 2441 "gram.y" { ColumnDef *n = makeNode(ColumnDef); - n->colname = (yyvsp[(1) - (1)].str); + n->colname = (yyvsp[0].str); n->typename = NULL; n->inhcount = 0; n->is_local = true; @@ -16885,9 +16662,9 @@ yyreduce: #line 2466 "gram.y" { CreateSeqStmt *n = makeNode(CreateSeqStmt); - (yyvsp[(4) - (5)].range)->istemp = (yyvsp[(2) - (5)].boolean); - n->sequence = (yyvsp[(4) - (5)].range); - n->options = (yyvsp[(5) - (5)].list); + (yyvsp[-1].range)->istemp = (yyvsp[-3].boolean); + n->sequence = (yyvsp[-1].range); + n->options = (yyvsp[0].list); (yyval.node) = (Node *)n; } break; @@ -16896,15 +16673,15 @@ yyreduce: #line 2477 "gram.y" { AlterSeqStmt *n = makeNode(AlterSeqStmt); - n->sequence = (yyvsp[(3) - (4)].range); - n->options = (yyvsp[(4) - (4)].list); + n->sequence = (yyvsp[-1].range); + n->options = (yyvsp[0].list); (yyval.node) = (Node *)n; } break; case 384: #line 2485 "gram.y" - { (yyval.list) = lappend((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].defelt)); } + { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].defelt)); } break; case 385: @@ -16915,7 +16692,7 @@ yyreduce: case 386: #line 2490 "gram.y" { - (yyval.defelt) = makeDefElem("cache", (Node *)(yyvsp[(2) - (2)].value)); + (yyval.defelt) = makeDefElem("cache", (Node *)(yyvsp[0].value)); } break; @@ -16936,21 +16713,21 @@ yyreduce: case 389: #line 2502 "gram.y" { - (yyval.defelt) = makeDefElem("increment", (Node *)(yyvsp[(3) - (3)].value)); + (yyval.defelt) = makeDefElem("increment", (Node *)(yyvsp[0].value)); } break; case 390: #line 2506 "gram.y" { - (yyval.defelt) = makeDefElem("maxvalue", (Node *)(yyvsp[(2) - (2)].value)); + (yyval.defelt) = makeDefElem("maxvalue", (Node *)(yyvsp[0].value)); } break; case 391: #line 2510 "gram.y" { - (yyval.defelt) = makeDefElem("minvalue", (Node *)(yyvsp[(2) - (2)].value)); + (yyval.defelt) = makeDefElem("minvalue", (Node *)(yyvsp[0].value)); } break; @@ -16971,21 +16748,21 @@ yyreduce: case 394: #line 2522 "gram.y" { - (yyval.defelt) = makeDefElem("owned_by", (Node *)(yyvsp[(3) - (3)].list)); + (yyval.defelt) = makeDefElem("owned_by", (Node *)(yyvsp[0].list)); } break; case 395: #line 2526 "gram.y" { - (yyval.defelt) = makeDefElem("start", (Node *)(yyvsp[(3) - (3)].value)); + (yyval.defelt) = makeDefElem("start", (Node *)(yyvsp[0].value)); } break; case 396: #line 2530 "gram.y" { - (yyval.defelt) = makeDefElem("restart", (Node *)(yyvsp[(3) - (3)].value)); + (yyval.defelt) = makeDefElem("restart", (Node *)(yyvsp[0].value)); } break; @@ -17001,37 +16778,37 @@ yyreduce: case 399: #line 2540 "gram.y" - { (yyval.value) = (yyvsp[(1) - (1)].value); } + { (yyval.value) = (yyvsp[0].value); } break; case 400: #line 2541 "gram.y" - { (yyval.value) = (yyvsp[(1) - (1)].value); } + { (yyval.value) = (yyvsp[0].value); } break; case 401: #line 2544 "gram.y" - { (yyval.value) = makeFloat((yyvsp[(1) - (1)].str)); } + { (yyval.value) = makeFloat((yyvsp[0].str)); } break; case 402: #line 2546 "gram.y" { - (yyval.value) = makeFloat((yyvsp[(2) - (2)].str)); + (yyval.value) = makeFloat((yyvsp[0].str)); doNegateFloat((yyval.value)); } break; case 403: #line 2552 "gram.y" - { (yyval.value) = makeInteger((yyvsp[(1) - (1)].ival)); } + { (yyval.value) = makeInteger((yyvsp[0].ival)); } break; case 404: #line 2565 "gram.y" { CreatePLangStmt *n = makeNode(CreatePLangStmt); - n->plname = (yyvsp[(5) - (5)].str); + n->plname = (yyvsp[0].str); /* parameters are all to be supplied by system */ n->plhandler = NIL; n->plvalidator = NIL; @@ -17044,10 +16821,10 @@ yyreduce: #line 2576 "gram.y" { CreatePLangStmt *n = makeNode(CreatePLangStmt); - n->plname = (yyvsp[(5) - (9)].str); - n->plhandler = (yyvsp[(7) - (9)].list); - n->plvalidator = (yyvsp[(8) - (9)].list); - n->pltrusted = (yyvsp[(2) - (9)].boolean); + n->plname = (yyvsp[-4].str); + n->plhandler = (yyvsp[-2].list); + n->plvalidator = (yyvsp[-1].list); + n->pltrusted = (yyvsp[-7].boolean); /* LANCOMPILER is now ignored entirely */ (yyval.node) = (Node *)n; } @@ -17065,17 +16842,17 @@ yyreduce: case 408: #line 2597 "gram.y" - { (yyval.list) = list_make1(makeString((yyvsp[(1) - (1)].str))); } + { (yyval.list) = list_make1(makeString((yyvsp[0].str))); } break; case 409: #line 2598 "gram.y" - { (yyval.list) = lcons(makeString((yyvsp[(1) - (2)].str)), (yyvsp[(2) - (2)].list)); } + { (yyval.list) = lcons(makeString((yyvsp[-1].str)), (yyvsp[0].list)); } break; case 410: #line 2602 "gram.y" - { (yyval.list) = (yyvsp[(2) - (2)].list); } + { (yyval.list) = (yyvsp[0].list); } break; case 411: @@ -17085,7 +16862,7 @@ yyreduce: case 412: #line 2607 "gram.y" - { (yyval.str) = (yyvsp[(2) - (2)].str); } + { (yyval.str) = (yyvsp[0].str); } break; case 413: @@ -17097,8 +16874,8 @@ yyreduce: #line 2613 "gram.y" { DropPLangStmt *n = makeNode(DropPLangStmt); - n->plname = (yyvsp[(4) - (5)].str); - n->behavior = (yyvsp[(5) - (5)].dbehavior); + n->plname = (yyvsp[-1].str); + n->behavior = (yyvsp[0].dbehavior); n->missing_ok = false; (yyval.node) = (Node *)n; } @@ -17108,8 +16885,8 @@ yyreduce: #line 2621 "gram.y" { DropPLangStmt *n = makeNode(DropPLangStmt); - n->plname = (yyvsp[(6) - (7)].str); - n->behavior = (yyvsp[(7) - (7)].dbehavior); + n->plname = (yyvsp[-1].str); + n->behavior = (yyvsp[0].dbehavior); n->missing_ok = true; (yyval.node) = (Node *)n; } @@ -17129,16 +16906,16 @@ yyreduce: #line 2643 "gram.y" { CreateTableSpaceStmt *n = makeNode(CreateTableSpaceStmt); - n->tablespacename = (yyvsp[(3) - (6)].str); - n->owner = (yyvsp[(4) - (6)].str); - n->location = (yyvsp[(6) - (6)].str); + n->tablespacename = (yyvsp[-3].str); + n->owner = (yyvsp[-2].str); + n->location = (yyvsp[0].str); (yyval.node) = (Node *) n; } break; case 419: #line 2652 "gram.y" - { (yyval.str) = (yyvsp[(2) - (2)].str); } + { (yyval.str) = (yyvsp[0].str); } break; case 420: @@ -17150,7 +16927,7 @@ yyreduce: #line 2667 "gram.y" { DropTableSpaceStmt *n = makeNode(DropTableSpaceStmt); - n->tablespacename = (yyvsp[(3) - (3)].str); + n->tablespacename = (yyvsp[0].str); n->missing_ok = false; (yyval.node) = (Node *) n; } @@ -17160,7 +16937,7 @@ yyreduce: #line 2674 "gram.y" { DropTableSpaceStmt *n = makeNode(DropTableSpaceStmt); - n->tablespacename = (yyvsp[(5) - (5)].str); + n->tablespacename = (yyvsp[0].str); n->missing_ok = true; (yyval.node) = (Node *) n; } @@ -17170,13 +16947,13 @@ yyreduce: #line 2694 "gram.y" { CreateTrigStmt *n = makeNode(CreateTrigStmt); - n->trigname = (yyvsp[(3) - (14)].str); - n->relation = (yyvsp[(7) - (14)].range); - n->funcname = (yyvsp[(11) - (14)].list); - n->args = (yyvsp[(13) - (14)].list); - n->before = (yyvsp[(4) - (14)].boolean); - n->row = (yyvsp[(8) - (14)].boolean); - memcpy(n->actions, (yyvsp[(5) - (14)].str), 4); + n->trigname = (yyvsp[-11].str); + n->relation = (yyvsp[-7].range); + n->funcname = (yyvsp[-3].list); + n->args = (yyvsp[-1].list); + n->before = (yyvsp[-10].boolean); + n->row = (yyvsp[-6].boolean); + memcpy(n->actions, (yyvsp[-9].str), 4); n->isconstraint = FALSE; n->deferrable = FALSE; n->initdeferred = FALSE; @@ -17189,18 +16966,18 @@ yyreduce: #line 2714 "gram.y" { CreateTrigStmt *n = makeNode(CreateTrigStmt); - n->trigname = (yyvsp[(4) - (19)].str); - n->relation = (yyvsp[(8) - (19)].range); - n->funcname = (yyvsp[(16) - (19)].list); - n->args = (yyvsp[(18) - (19)].list); + n->trigname = (yyvsp[-15].str); + n->relation = (yyvsp[-11].range); + n->funcname = (yyvsp[-3].list); + n->args = (yyvsp[-1].list); n->before = FALSE; n->row = TRUE; - memcpy(n->actions, (yyvsp[(6) - (19)].str), 4); + memcpy(n->actions, (yyvsp[-13].str), 4); n->isconstraint = TRUE; - n->deferrable = ((yyvsp[(10) - (19)].ival) & 1) != 0; - n->initdeferred = ((yyvsp[(10) - (19)].ival) & 2) != 0; + n->deferrable = ((yyvsp[-9].ival) & 1) != 0; + n->initdeferred = ((yyvsp[-9].ival) & 2) != 0; - n->constrrel = (yyvsp[(9) - (19)].range); + n->constrrel = (yyvsp[-10].range); (yyval.node) = (Node *)n; } break; @@ -17219,7 +16996,7 @@ yyreduce: #line 2739 "gram.y" { char *e = palloc(4); - e[0] = (yyvsp[(1) - (1)].chr); e[1] = '\0'; + e[0] = (yyvsp[0].chr); e[1] = '\0'; (yyval.str) = e; } break; @@ -17228,7 +17005,7 @@ yyreduce: #line 2745 "gram.y" { char *e = palloc(4); - e[0] = (yyvsp[(1) - (3)].chr); e[1] = (yyvsp[(3) - (3)].chr); e[2] = '\0'; + e[0] = (yyvsp[-2].chr); e[1] = (yyvsp[0].chr); e[2] = '\0'; (yyval.str) = e; } break; @@ -17237,7 +17014,7 @@ yyreduce: #line 2751 "gram.y" { char *e = palloc(4); - e[0] = (yyvsp[(1) - (5)].chr); e[1] = (yyvsp[(3) - (5)].chr); e[2] = (yyvsp[(5) - (5)].chr); e[3] = '\0'; + e[0] = (yyvsp[-4].chr); e[1] = (yyvsp[-2].chr); e[2] = (yyvsp[0].chr); e[3] = '\0'; (yyval.str) = e; } break; @@ -17260,7 +17037,7 @@ yyreduce: case 433: #line 2766 "gram.y" { - (yyval.boolean) = (yyvsp[(3) - (3)].boolean); + (yyval.boolean) = (yyvsp[0].boolean); } break; @@ -17297,12 +17074,12 @@ yyreduce: case 439: #line 2790 "gram.y" - { (yyval.list) = list_make1((yyvsp[(1) - (1)].value)); } + { (yyval.list) = list_make1((yyvsp[0].value)); } break; case 440: #line 2791 "gram.y" - { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].value)); } + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].value)); } break; case 441: @@ -17314,39 +17091,39 @@ yyreduce: #line 2797 "gram.y" { char buf[64]; - snprintf(buf, sizeof(buf), "%d", (yyvsp[(1) - (1)].ival)); + snprintf(buf, sizeof(buf), "%d", (yyvsp[0].ival)); (yyval.value) = makeString(pstrdup(buf)); } break; case 443: #line 2802 "gram.y" - { (yyval.value) = makeString((yyvsp[(1) - (1)].str)); } + { (yyval.value) = makeString((yyvsp[0].str)); } break; case 444: #line 2803 "gram.y" - { (yyval.value) = makeString((yyvsp[(1) - (1)].str)); } + { (yyval.value) = makeString((yyvsp[0].str)); } break; case 445: #line 2804 "gram.y" - { (yyval.value) = makeString((yyvsp[(1) - (1)].str)); } + { (yyval.value) = makeString((yyvsp[0].str)); } break; case 446: #line 2805 "gram.y" - { (yyval.value) = makeString((yyvsp[(1) - (1)].str)); } + { (yyval.value) = makeString((yyvsp[0].str)); } break; case 447: #line 2806 "gram.y" - { (yyval.value) = makeString((yyvsp[(1) - (1)].str)); } + { (yyval.value) = makeString((yyvsp[0].str)); } break; case 448: #line 2810 "gram.y" - { (yyval.range) = (yyvsp[(2) - (2)].range); } + { (yyval.range) = (yyvsp[0].range); } break; case 449: @@ -17356,24 +17133,24 @@ yyreduce: case 450: #line 2816 "gram.y" - { (yyval.ival) = (yyvsp[(1) - (1)].ival); } + { (yyval.ival) = (yyvsp[0].ival); } break; case 451: #line 2818 "gram.y" { - if ((yyvsp[(1) - (2)].ival) == 0 && (yyvsp[(2) - (2)].ival) != 0) + if ((yyvsp[-1].ival) == 0 && (yyvsp[0].ival) != 0) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), errmsg("constraint declared INITIALLY DEFERRED must be DEFERRABLE"))); - (yyval.ival) = (yyvsp[(1) - (2)].ival) | (yyvsp[(2) - (2)].ival); + (yyval.ival) = (yyvsp[-1].ival) | (yyvsp[0].ival); } break; case 452: #line 2826 "gram.y" { - if ((yyvsp[(1) - (1)].ival) != 0) + if ((yyvsp[0].ival) != 0) (yyval.ival) = 3; else (yyval.ival) = 0; @@ -17383,11 +17160,11 @@ yyreduce: case 453: #line 2833 "gram.y" { - if ((yyvsp[(2) - (2)].ival) == 0 && (yyvsp[(1) - (2)].ival) != 0) + if ((yyvsp[0].ival) == 0 && (yyvsp[-1].ival) != 0) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), errmsg("constraint declared INITIALLY DEFERRED must be DEFERRABLE"))); - (yyval.ival) = (yyvsp[(1) - (2)].ival) | (yyvsp[(2) - (2)].ival); + (yyval.ival) = (yyvsp[-1].ival) | (yyvsp[0].ival); } break; @@ -17420,9 +17197,9 @@ yyreduce: #line 2857 "gram.y" { DropPropertyStmt *n = makeNode(DropPropertyStmt); - n->relation = (yyvsp[(5) - (6)].range); - n->property = (yyvsp[(3) - (6)].str); - n->behavior = (yyvsp[(6) - (6)].dbehavior); + n->relation = (yyvsp[-1].range); + n->property = (yyvsp[-3].str); + n->behavior = (yyvsp[0].dbehavior); n->removeType = OBJECT_TRIGGER; n->missing_ok = false; (yyval.node) = (Node *) n; @@ -17433,9 +17210,9 @@ yyreduce: #line 2867 "gram.y" { DropPropertyStmt *n = makeNode(DropPropertyStmt); - n->relation = (yyvsp[(7) - (8)].range); - n->property = (yyvsp[(5) - (8)].str); - n->behavior = (yyvsp[(8) - (8)].dbehavior); + n->relation = (yyvsp[-1].range); + n->property = (yyvsp[-3].str); + n->behavior = (yyvsp[0].dbehavior); n->removeType = OBJECT_TRIGGER; n->missing_ok = true; (yyval.node) = (Node *) n; @@ -17446,11 +17223,11 @@ yyreduce: #line 2890 "gram.y" { CreateTrigStmt *n = makeNode(CreateTrigStmt); - n->trigname = (yyvsp[(3) - (8)].str); - n->args = list_make1((yyvsp[(6) - (8)].node)); + n->trigname = (yyvsp[-5].str); + n->args = list_make1((yyvsp[-2].node)); n->isconstraint = TRUE; - n->deferrable = ((yyvsp[(8) - (8)].ival) & 1) != 0; - n->initdeferred = ((yyvsp[(8) - (8)].ival) & 2) != 0; + n->deferrable = ((yyvsp[0].ival) & 1) != 0; + n->initdeferred = ((yyvsp[0].ival) & 2) != 0; ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), @@ -17465,8 +17242,8 @@ yyreduce: { DropPropertyStmt *n = makeNode(DropPropertyStmt); n->relation = NULL; - n->property = (yyvsp[(3) - (4)].str); - n->behavior = (yyvsp[(4) - (4)].dbehavior); + n->property = (yyvsp[-1].str); + n->behavior = (yyvsp[0].dbehavior); n->removeType = OBJECT_TRIGGER; /* XXX */ ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), @@ -17481,9 +17258,9 @@ yyreduce: DefineStmt *n = makeNode(DefineStmt); n->kind = OBJECT_AGGREGATE; n->oldstyle = false; - n->defnames = (yyvsp[(3) - (5)].list); - n->args = (yyvsp[(4) - (5)].list); - n->definition = (yyvsp[(5) - (5)].list); + n->defnames = (yyvsp[-2].list); + n->args = (yyvsp[-1].list); + n->definition = (yyvsp[0].list); (yyval.node) = (Node *)n; } break; @@ -17495,9 +17272,9 @@ yyreduce: DefineStmt *n = makeNode(DefineStmt); n->kind = OBJECT_AGGREGATE; n->oldstyle = true; - n->defnames = (yyvsp[(3) - (4)].list); + n->defnames = (yyvsp[-1].list); n->args = NIL; - n->definition = (yyvsp[(4) - (4)].list); + n->definition = (yyvsp[0].list); (yyval.node) = (Node *)n; } break; @@ -17508,9 +17285,9 @@ yyreduce: DefineStmt *n = makeNode(DefineStmt); n->kind = OBJECT_OPERATOR; n->oldstyle = false; - n->defnames = (yyvsp[(3) - (4)].list); + n->defnames = (yyvsp[-1].list); n->args = NIL; - n->definition = (yyvsp[(4) - (4)].list); + n->definition = (yyvsp[0].list); (yyval.node) = (Node *)n; } break; @@ -17521,9 +17298,9 @@ yyreduce: DefineStmt *n = makeNode(DefineStmt); n->kind = OBJECT_TYPE; n->oldstyle = false; - n->defnames = (yyvsp[(3) - (4)].list); + n->defnames = (yyvsp[-1].list); n->args = NIL; - n->definition = (yyvsp[(4) - (4)].list); + n->definition = (yyvsp[0].list); (yyval.node) = (Node *)n; } break; @@ -17535,7 +17312,7 @@ yyreduce: DefineStmt *n = makeNode(DefineStmt); n->kind = OBJECT_TYPE; n->oldstyle = false; - n->defnames = (yyvsp[(3) - (3)].list); + n->defnames = (yyvsp[0].list); n->args = NIL; n->definition = NIL; (yyval.node) = (Node *)n; @@ -17549,32 +17326,32 @@ yyreduce: RangeVar *r = makeNode(RangeVar); /* can't use qualified_name, sigh */ - switch (list_length((yyvsp[(3) - (7)].list))) + switch (list_length((yyvsp[-4].list))) { case 1: r->catalogname = NULL; r->schemaname = NULL; - r->relname = strVal(linitial((yyvsp[(3) - (7)].list))); + r->relname = strVal(linitial((yyvsp[-4].list))); break; case 2: r->catalogname = NULL; - r->schemaname = strVal(linitial((yyvsp[(3) - (7)].list))); - r->relname = strVal(lsecond((yyvsp[(3) - (7)].list))); + r->schemaname = strVal(linitial((yyvsp[-4].list))); + r->relname = strVal(lsecond((yyvsp[-4].list))); break; case 3: - r->catalogname = strVal(linitial((yyvsp[(3) - (7)].list))); - r->schemaname = strVal(lsecond((yyvsp[(3) - (7)].list))); - r->relname = strVal(lthird((yyvsp[(3) - (7)].list))); + r->catalogname = strVal(linitial((yyvsp[-4].list))); + r->schemaname = strVal(lsecond((yyvsp[-4].list))); + r->relname = strVal(lthird((yyvsp[-4].list))); break; default: ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), errmsg("improper qualified name (too many dotted names): %s", - NameListToString((yyvsp[(3) - (7)].list))))); + NameListToString((yyvsp[-4].list))))); break; } n->typevar = r; - n->coldeflist = (yyvsp[(6) - (7)].list); + n->coldeflist = (yyvsp[-1].list); (yyval.node) = (Node *)n; } break; @@ -17583,8 +17360,8 @@ yyreduce: #line 3017 "gram.y" { CreateEnumStmt *n = makeNode(CreateEnumStmt); - n->typename = (yyvsp[(3) - (8)].list); - n->vals = (yyvsp[(7) - (8)].list); + n->typename = (yyvsp[-5].list); + n->vals = (yyvsp[-1].list); (yyval.node) = (Node *)n; } break; @@ -17595,8 +17372,8 @@ yyreduce: DefineStmt *n = makeNode(DefineStmt); n->kind = OBJECT_TSPARSER; n->args = NIL; - n->defnames = (yyvsp[(5) - (6)].list); - n->definition = (yyvsp[(6) - (6)].list); + n->defnames = (yyvsp[-1].list); + n->definition = (yyvsp[0].list); (yyval.node) = (Node *)n; } break; @@ -17607,8 +17384,8 @@ yyreduce: DefineStmt *n = makeNode(DefineStmt); n->kind = OBJECT_TSDICTIONARY; n->args = NIL; - n->defnames = (yyvsp[(5) - (6)].list); - n->definition = (yyvsp[(6) - (6)].list); + n->defnames = (yyvsp[-1].list); + n->definition = (yyvsp[0].list); (yyval.node) = (Node *)n; } break; @@ -17619,8 +17396,8 @@ yyreduce: DefineStmt *n = makeNode(DefineStmt); n->kind = OBJECT_TSTEMPLATE; n->args = NIL; - n->defnames = (yyvsp[(5) - (6)].list); - n->definition = (yyvsp[(6) - (6)].list); + n->defnames = (yyvsp[-1].list); + n->definition = (yyvsp[0].list); (yyval.node) = (Node *)n; } break; @@ -17631,69 +17408,69 @@ yyreduce: DefineStmt *n = makeNode(DefineStmt); n->kind = OBJECT_TSCONFIGURATION; n->args = NIL; - n->defnames = (yyvsp[(5) - (6)].list); - n->definition = (yyvsp[(6) - (6)].list); + n->defnames = (yyvsp[-1].list); + n->definition = (yyvsp[0].list); (yyval.node) = (Node *)n; } break; case 474: #line 3061 "gram.y" - { (yyval.list) = (yyvsp[(2) - (3)].list); } + { (yyval.list) = (yyvsp[-1].list); } break; case 475: #line 3064 "gram.y" - { (yyval.list) = list_make1((yyvsp[(1) - (1)].defelt)); } + { (yyval.list) = list_make1((yyvsp[0].defelt)); } break; case 476: #line 3065 "gram.y" - { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].defelt)); } + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].defelt)); } break; case 477: #line 3069 "gram.y" { - (yyval.defelt) = makeDefElem((yyvsp[(1) - (3)].str), (Node *)(yyvsp[(3) - (3)].node)); + (yyval.defelt) = makeDefElem((yyvsp[-2].str), (Node *)(yyvsp[0].node)); } break; case 478: #line 3073 "gram.y" { - (yyval.defelt) = makeDefElem((yyvsp[(1) - (1)].str), NULL); + (yyval.defelt) = makeDefElem((yyvsp[0].str), NULL); } break; case 479: #line 3079 "gram.y" - { (yyval.node) = (Node *)(yyvsp[(1) - (1)].typnam); } + { (yyval.node) = (Node *)(yyvsp[0].typnam); } break; case 480: #line 3080 "gram.y" - { (yyval.node) = (Node *)makeString(pstrdup((yyvsp[(1) - (1)].keyword))); } + { (yyval.node) = (Node *)makeString(pstrdup((yyvsp[0].keyword))); } break; case 481: #line 3081 "gram.y" - { (yyval.node) = (Node *)(yyvsp[(1) - (1)].list); } + { (yyval.node) = (Node *)(yyvsp[0].list); } break; case 482: #line 3082 "gram.y" - { (yyval.node) = (Node *)(yyvsp[(1) - (1)].value); } + { (yyval.node) = (Node *)(yyvsp[0].value); } break; case 483: #line 3083 "gram.y" - { (yyval.node) = (Node *)makeString((yyvsp[(1) - (1)].str)); } + { (yyval.node) = (Node *)makeString((yyvsp[0].str)); } break; case 484: #line 3086 "gram.y" - { (yyval.list) = (yyvsp[(2) - (3)].list); } + { (yyval.list) = (yyvsp[-1].list); } break; case 485: @@ -17703,58 +17480,58 @@ yyreduce: case 486: #line 3090 "gram.y" - { (yyval.list) = (yyvsp[(2) - (3)].list); } + { (yyval.list) = (yyvsp[-1].list); } break; case 487: #line 3093 "gram.y" - { (yyval.list) = list_make1((yyvsp[(1) - (1)].defelt)); } + { (yyval.list) = list_make1((yyvsp[0].defelt)); } break; case 488: #line 3094 "gram.y" - { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].defelt)); } + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].defelt)); } break; case 489: #line 3098 "gram.y" { - (yyval.defelt) = makeDefElem((yyvsp[(1) - (3)].str), (Node *)(yyvsp[(3) - (3)].node)); + (yyval.defelt) = makeDefElem((yyvsp[-2].str), (Node *)(yyvsp[0].node)); } break; case 490: #line 3104 "gram.y" - { (yyval.list) = list_make1(makeString((yyvsp[(1) - (1)].str))); } + { (yyval.list) = list_make1(makeString((yyvsp[0].str))); } break; case 491: #line 3106 "gram.y" - { (yyval.list) = lappend((yyvsp[(1) - (3)].list), makeString((yyvsp[(3) - (3)].str))); } + { (yyval.list) = lappend((yyvsp[-2].list), makeString((yyvsp[0].str))); } break; case 492: #line 3124 "gram.y" { CreateOpClassStmt *n = makeNode(CreateOpClassStmt); - n->opclassname = (yyvsp[(4) - (13)].list); - n->isDefault = (yyvsp[(5) - (13)].boolean); - n->datatype = (yyvsp[(8) - (13)].typnam); - n->amname = (yyvsp[(10) - (13)].str); - n->opfamilyname = (yyvsp[(11) - (13)].list); - n->items = (yyvsp[(13) - (13)].list); + n->opclassname = (yyvsp[-9].list); + n->isDefault = (yyvsp[-8].boolean); + n->datatype = (yyvsp[-5].typnam); + n->amname = (yyvsp[-3].str); + n->opfamilyname = (yyvsp[-2].list); + n->items = (yyvsp[0].list); (yyval.node) = (Node *) n; } break; case 493: #line 3137 "gram.y" - { (yyval.list) = list_make1((yyvsp[(1) - (1)].node)); } + { (yyval.list) = list_make1((yyvsp[0].node)); } break; case 494: #line 3138 "gram.y" - { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); } + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].node)); } break; case 495: @@ -17762,10 +17539,10 @@ yyreduce: { CreateOpClassItem *n = makeNode(CreateOpClassItem); n->itemtype = OPCLASS_ITEM_OPERATOR; - n->name = (yyvsp[(3) - (4)].list); + n->name = (yyvsp[-1].list); n->args = NIL; - n->number = (yyvsp[(2) - (4)].ival); - n->recheck = (yyvsp[(4) - (4)].boolean); + n->number = (yyvsp[-2].ival); + n->recheck = (yyvsp[0].boolean); (yyval.node) = (Node *) n; } break; @@ -17775,10 +17552,10 @@ yyreduce: { CreateOpClassItem *n = makeNode(CreateOpClassItem); n->itemtype = OPCLASS_ITEM_OPERATOR; - n->name = (yyvsp[(3) - (7)].list); - n->args = (yyvsp[(5) - (7)].list); - n->number = (yyvsp[(2) - (7)].ival); - n->recheck = (yyvsp[(7) - (7)].boolean); + n->name = (yyvsp[-4].list); + n->args = (yyvsp[-2].list); + n->number = (yyvsp[-5].ival); + n->recheck = (yyvsp[0].boolean); (yyval.node) = (Node *) n; } break; @@ -17788,9 +17565,9 @@ yyreduce: { CreateOpClassItem *n = makeNode(CreateOpClassItem); n->itemtype = OPCLASS_ITEM_FUNCTION; - n->name = (yyvsp[(3) - (4)].list); - n->args = extractArgTypes((yyvsp[(4) - (4)].list)); - n->number = (yyvsp[(2) - (4)].ival); + n->name = (yyvsp[-1].list); + n->args = extractArgTypes((yyvsp[0].list)); + n->number = (yyvsp[-2].ival); (yyval.node) = (Node *) n; } break; @@ -17800,10 +17577,10 @@ yyreduce: { CreateOpClassItem *n = makeNode(CreateOpClassItem); n->itemtype = OPCLASS_ITEM_FUNCTION; - n->name = (yyvsp[(6) - (7)].list); - n->args = extractArgTypes((yyvsp[(7) - (7)].list)); - n->number = (yyvsp[(2) - (7)].ival); - n->class_args = (yyvsp[(4) - (7)].list); + n->name = (yyvsp[-1].list); + n->args = extractArgTypes((yyvsp[0].list)); + n->number = (yyvsp[-5].ival); + n->class_args = (yyvsp[-3].list); (yyval.node) = (Node *) n; } break; @@ -17813,7 +17590,7 @@ yyreduce: { CreateOpClassItem *n = makeNode(CreateOpClassItem); n->itemtype = OPCLASS_ITEM_STORAGETYPE; - n->storedtype = (yyvsp[(2) - (2)].typnam); + n->storedtype = (yyvsp[0].typnam); (yyval.node) = (Node *) n; } break; @@ -17830,7 +17607,7 @@ yyreduce: case 502: #line 3194 "gram.y" - { (yyval.list) = (yyvsp[(2) - (2)].list); } + { (yyval.list) = (yyvsp[0].list); } break; case 503: @@ -17852,8 +17629,8 @@ yyreduce: #line 3205 "gram.y" { CreateOpFamilyStmt *n = makeNode(CreateOpFamilyStmt); - n->opfamilyname = (yyvsp[(4) - (6)].list); - n->amname = (yyvsp[(6) - (6)].str); + n->opfamilyname = (yyvsp[-2].list); + n->amname = (yyvsp[0].str); (yyval.node) = (Node *) n; } break; @@ -17862,10 +17639,10 @@ yyreduce: #line 3215 "gram.y" { AlterOpFamilyStmt *n = makeNode(AlterOpFamilyStmt); - n->opfamilyname = (yyvsp[(4) - (8)].list); - n->amname = (yyvsp[(6) - (8)].str); + n->opfamilyname = (yyvsp[-4].list); + n->amname = (yyvsp[-2].str); n->isDrop = false; - n->items = (yyvsp[(8) - (8)].list); + n->items = (yyvsp[0].list); (yyval.node) = (Node *) n; } break; @@ -17874,22 +17651,22 @@ yyreduce: #line 3224 "gram.y" { AlterOpFamilyStmt *n = makeNode(AlterOpFamilyStmt); - n->opfamilyname = (yyvsp[(4) - (8)].list); - n->amname = (yyvsp[(6) - (8)].str); + n->opfamilyname = (yyvsp[-4].list); + n->amname = (yyvsp[-2].str); n->isDrop = true; - n->items = (yyvsp[(8) - (8)].list); + n->items = (yyvsp[0].list); (yyval.node) = (Node *) n; } break; case 509: #line 3235 "gram.y" - { (yyval.list) = list_make1((yyvsp[(1) - (1)].node)); } + { (yyval.list) = list_make1((yyvsp[0].node)); } break; case 510: #line 3236 "gram.y" - { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); } + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].node)); } break; case 511: @@ -17897,8 +17674,8 @@ yyreduce: { CreateOpClassItem *n = makeNode(CreateOpClassItem); n->itemtype = OPCLASS_ITEM_OPERATOR; - n->number = (yyvsp[(2) - (5)].ival); - n->args = (yyvsp[(4) - (5)].list); + n->number = (yyvsp[-3].ival); + n->args = (yyvsp[-1].list); (yyval.node) = (Node *) n; } break; @@ -17908,8 +17685,8 @@ yyreduce: { CreateOpClassItem *n = makeNode(CreateOpClassItem); n->itemtype = OPCLASS_ITEM_FUNCTION; - n->number = (yyvsp[(2) - (5)].ival); - n->args = (yyvsp[(4) - (5)].list); + n->number = (yyvsp[-3].ival); + n->args = (yyvsp[-1].list); (yyval.node) = (Node *) n; } break; @@ -17918,9 +17695,9 @@ yyreduce: #line 3261 "gram.y" { RemoveOpClassStmt *n = makeNode(RemoveOpClassStmt); - n->opclassname = (yyvsp[(4) - (7)].list); - n->amname = (yyvsp[(6) - (7)].str); - n->behavior = (yyvsp[(7) - (7)].dbehavior); + n->opclassname = (yyvsp[-3].list); + n->amname = (yyvsp[-1].str); + n->behavior = (yyvsp[0].dbehavior); n->missing_ok = false; (yyval.node) = (Node *) n; } @@ -17930,9 +17707,9 @@ yyreduce: #line 3270 "gram.y" { RemoveOpClassStmt *n = makeNode(RemoveOpClassStmt); - n->opclassname = (yyvsp[(6) - (9)].list); - n->amname = (yyvsp[(8) - (9)].str); - n->behavior = (yyvsp[(9) - (9)].dbehavior); + n->opclassname = (yyvsp[-3].list); + n->amname = (yyvsp[-1].str); + n->behavior = (yyvsp[0].dbehavior); n->missing_ok = true; (yyval.node) = (Node *) n; } @@ -17942,9 +17719,9 @@ yyreduce: #line 3282 "gram.y" { RemoveOpFamilyStmt *n = makeNode(RemoveOpFamilyStmt); - n->opfamilyname = (yyvsp[(4) - (7)].list); - n->amname = (yyvsp[(6) - (7)].str); - n->behavior = (yyvsp[(7) - (7)].dbehavior); + n->opfamilyname = (yyvsp[-3].list); + n->amname = (yyvsp[-1].str); + n->behavior = (yyvsp[0].dbehavior); n->missing_ok = false; (yyval.node) = (Node *) n; } @@ -17954,9 +17731,9 @@ yyreduce: #line 3291 "gram.y" { RemoveOpFamilyStmt *n = makeNode(RemoveOpFamilyStmt); - n->opfamilyname = (yyvsp[(6) - (9)].list); - n->amname = (yyvsp[(8) - (9)].str); - n->behavior = (yyvsp[(9) - (9)].dbehavior); + n->opfamilyname = (yyvsp[-3].list); + n->amname = (yyvsp[-1].str); + n->behavior = (yyvsp[0].dbehavior); n->missing_ok = true; (yyval.node) = (Node *) n; } @@ -17966,8 +17743,8 @@ yyreduce: #line 3312 "gram.y" { DropOwnedStmt *n = makeNode(DropOwnedStmt); - n->roles = (yyvsp[(4) - (5)].list); - n->behavior = (yyvsp[(5) - (5)].dbehavior); + n->roles = (yyvsp[-1].list); + n->behavior = (yyvsp[0].dbehavior); (yyval.node) = (Node *)n; } break; @@ -17976,8 +17753,8 @@ yyreduce: #line 3322 "gram.y" { ReassignOwnedStmt *n = makeNode(ReassignOwnedStmt); - n->roles = (yyvsp[(4) - (6)].list); - n->newrole = (yyvsp[(6) - (6)].str); + n->roles = (yyvsp[-2].list); + n->newrole = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -17986,10 +17763,10 @@ yyreduce: #line 3340 "gram.y" { DropStmt *n = makeNode(DropStmt); - n->removeType = (yyvsp[(2) - (6)].objtype); + n->removeType = (yyvsp[-4].objtype); n->missing_ok = TRUE; - n->objects = (yyvsp[(5) - (6)].list); - n->behavior = (yyvsp[(6) - (6)].dbehavior); + n->objects = (yyvsp[-1].list); + n->behavior = (yyvsp[0].dbehavior); (yyval.node) = (Node *)n; } break; @@ -17998,10 +17775,10 @@ yyreduce: #line 3349 "gram.y" { DropStmt *n = makeNode(DropStmt); - n->removeType = (yyvsp[(2) - (4)].objtype); + n->removeType = (yyvsp[-2].objtype); n->missing_ok = FALSE; - n->objects = (yyvsp[(3) - (4)].list); - n->behavior = (yyvsp[(4) - (4)].dbehavior); + n->objects = (yyvsp[-1].list); + n->behavior = (yyvsp[0].dbehavior); (yyval.node) = (Node *)n; } break; @@ -18068,40 +17845,40 @@ yyreduce: case 533: #line 3375 "gram.y" - { (yyval.list) = list_make1((yyvsp[(1) - (1)].list)); } + { (yyval.list) = list_make1((yyvsp[0].list)); } break; case 534: #line 3376 "gram.y" - { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].list)); } + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].list)); } break; case 535: #line 3379 "gram.y" - { (yyval.list) = list_make1(makeString((yyvsp[(1) - (1)].str))); } + { (yyval.list) = list_make1(makeString((yyvsp[0].str))); } break; case 536: #line 3380 "gram.y" - { (yyval.list) = lcons(makeString((yyvsp[(1) - (2)].str)), (yyvsp[(2) - (2)].list)); } + { (yyval.list) = lcons(makeString((yyvsp[-1].str)), (yyvsp[0].list)); } break; case 537: #line 3384 "gram.y" - { (yyval.list) = list_make1(makeString((yyvsp[(2) - (2)].str))); } + { (yyval.list) = list_make1(makeString((yyvsp[0].str))); } break; case 538: #line 3386 "gram.y" - { (yyval.list) = lappend((yyvsp[(1) - (3)].list), makeString((yyvsp[(3) - (3)].str))); } + { (yyval.list) = lappend((yyvsp[-2].list), makeString((yyvsp[0].str))); } break; case 539: #line 3399 "gram.y" { TruncateStmt *n = makeNode(TruncateStmt); - n->relations = (yyvsp[(3) - (4)].list); - n->behavior = (yyvsp[(4) - (4)].dbehavior); + n->relations = (yyvsp[-1].list); + n->behavior = (yyvsp[0].dbehavior); (yyval.node) = (Node *)n; } break; @@ -18110,10 +17887,10 @@ yyreduce: #line 3430 "gram.y" { CommentStmt *n = makeNode(CommentStmt); - n->objtype = (yyvsp[(3) - (6)].objtype); - n->objname = (yyvsp[(4) - (6)].list); + n->objtype = (yyvsp[-3].objtype); + n->objname = (yyvsp[-2].list); n->objargs = NIL; - n->comment = (yyvsp[(6) - (6)].str); + n->comment = (yyvsp[0].str); (yyval.node) = (Node *) n; } break; @@ -18123,9 +17900,9 @@ yyreduce: { CommentStmt *n = makeNode(CommentStmt); n->objtype = OBJECT_AGGREGATE; - n->objname = (yyvsp[(4) - (7)].list); - n->objargs = (yyvsp[(5) - (7)].list); - n->comment = (yyvsp[(7) - (7)].str); + n->objname = (yyvsp[-3].list); + n->objargs = (yyvsp[-2].list); + n->comment = (yyvsp[0].str); (yyval.node) = (Node *) n; } break; @@ -18135,9 +17912,9 @@ yyreduce: { CommentStmt *n = makeNode(CommentStmt); n->objtype = OBJECT_FUNCTION; - n->objname = (yyvsp[(4) - (7)].list); - n->objargs = extractArgTypes((yyvsp[(5) - (7)].list)); - n->comment = (yyvsp[(7) - (7)].str); + n->objname = (yyvsp[-3].list); + n->objargs = extractArgTypes((yyvsp[-2].list)); + n->comment = (yyvsp[0].str); (yyval.node) = (Node *) n; } break; @@ -18147,9 +17924,9 @@ yyreduce: { CommentStmt *n = makeNode(CommentStmt); n->objtype = OBJECT_OPERATOR; - n->objname = (yyvsp[(4) - (9)].list); - n->objargs = (yyvsp[(6) - (9)].list); - n->comment = (yyvsp[(9) - (9)].str); + n->objname = (yyvsp[-5].list); + n->objargs = (yyvsp[-3].list); + n->comment = (yyvsp[0].str); (yyval.node) = (Node *) n; } break; @@ -18159,9 +17936,9 @@ yyreduce: { CommentStmt *n = makeNode(CommentStmt); n->objtype = OBJECT_CONSTRAINT; - n->objname = lappend((yyvsp[(6) - (8)].list), makeString((yyvsp[(4) - (8)].str))); + n->objname = lappend((yyvsp[-2].list), makeString((yyvsp[-4].str))); n->objargs = NIL; - n->comment = (yyvsp[(8) - (8)].str); + n->comment = (yyvsp[0].str); (yyval.node) = (Node *) n; } break; @@ -18171,9 +17948,9 @@ yyreduce: { CommentStmt *n = makeNode(CommentStmt); n->objtype = OBJECT_RULE; - n->objname = lappend((yyvsp[(6) - (8)].list), makeString((yyvsp[(4) - (8)].str))); + n->objname = lappend((yyvsp[-2].list), makeString((yyvsp[-4].str))); n->objargs = NIL; - n->comment = (yyvsp[(8) - (8)].str); + n->comment = (yyvsp[0].str); (yyval.node) = (Node *) n; } break; @@ -18184,9 +17961,9 @@ yyreduce: /* Obsolete syntax supported for awhile for compatibility */ CommentStmt *n = makeNode(CommentStmt); n->objtype = OBJECT_RULE; - n->objname = list_make1(makeString((yyvsp[(4) - (6)].str))); + n->objname = list_make1(makeString((yyvsp[-2].str))); n->objargs = NIL; - n->comment = (yyvsp[(6) - (6)].str); + n->comment = (yyvsp[0].str); (yyval.node) = (Node *) n; } break; @@ -18196,9 +17973,9 @@ yyreduce: { CommentStmt *n = makeNode(CommentStmt); n->objtype = OBJECT_TRIGGER; - n->objname = lappend((yyvsp[(6) - (8)].list), makeString((yyvsp[(4) - (8)].str))); + n->objname = lappend((yyvsp[-2].list), makeString((yyvsp[-4].str))); n->objargs = NIL; - n->comment = (yyvsp[(8) - (8)].str); + n->comment = (yyvsp[0].str); (yyval.node) = (Node *) n; } break; @@ -18208,9 +17985,9 @@ yyreduce: { CommentStmt *n = makeNode(CommentStmt); n->objtype = OBJECT_OPCLASS; - n->objname = (yyvsp[(5) - (9)].list); - n->objargs = list_make1(makeString((yyvsp[(7) - (9)].str))); - n->comment = (yyvsp[(9) - (9)].str); + n->objname = (yyvsp[-4].list); + n->objargs = list_make1(makeString((yyvsp[-2].str))); + n->comment = (yyvsp[0].str); (yyval.node) = (Node *) n; } break; @@ -18220,9 +17997,9 @@ yyreduce: { CommentStmt *n = makeNode(CommentStmt); n->objtype = OBJECT_OPFAMILY; - n->objname = (yyvsp[(5) - (9)].list); - n->objargs = list_make1(makeString((yyvsp[(7) - (9)].str))); - n->comment = (yyvsp[(9) - (9)].str); + n->objname = (yyvsp[-4].list); + n->objargs = list_make1(makeString((yyvsp[-2].str))); + n->comment = (yyvsp[0].str); (yyval.node) = (Node *) n; } break; @@ -18232,9 +18009,9 @@ yyreduce: { CommentStmt *n = makeNode(CommentStmt); n->objtype = OBJECT_LARGEOBJECT; - n->objname = list_make1((yyvsp[(5) - (7)].value)); + n->objname = list_make1((yyvsp[-2].value)); n->objargs = NIL; - n->comment = (yyvsp[(7) - (7)].str); + n->comment = (yyvsp[0].str); (yyval.node) = (Node *) n; } break; @@ -18244,9 +18021,9 @@ yyreduce: { CommentStmt *n = makeNode(CommentStmt); n->objtype = OBJECT_CAST; - n->objname = list_make1((yyvsp[(5) - (10)].typnam)); - n->objargs = list_make1((yyvsp[(7) - (10)].typnam)); - n->comment = (yyvsp[(10) - (10)].str); + n->objname = list_make1((yyvsp[-5].typnam)); + n->objargs = list_make1((yyvsp[-3].typnam)); + n->comment = (yyvsp[0].str); (yyval.node) = (Node *) n; } break; @@ -18256,9 +18033,9 @@ yyreduce: { CommentStmt *n = makeNode(CommentStmt); n->objtype = OBJECT_LANGUAGE; - n->objname = (yyvsp[(5) - (7)].list); + n->objname = (yyvsp[-2].list); n->objargs = NIL; - n->comment = (yyvsp[(7) - (7)].str); + n->comment = (yyvsp[0].str); (yyval.node) = (Node *) n; } break; @@ -18268,8 +18045,8 @@ yyreduce: { CommentStmt *n = makeNode(CommentStmt); n->objtype = OBJECT_TSPARSER; - n->objname = (yyvsp[(6) - (8)].list); - n->comment = (yyvsp[(8) - (8)].str); + n->objname = (yyvsp[-2].list); + n->comment = (yyvsp[0].str); (yyval.node) = (Node *) n; } break; @@ -18279,8 +18056,8 @@ yyreduce: { CommentStmt *n = makeNode(CommentStmt); n->objtype = OBJECT_TSDICTIONARY; - n->objname = (yyvsp[(6) - (8)].list); - n->comment = (yyvsp[(8) - (8)].str); + n->objname = (yyvsp[-2].list); + n->comment = (yyvsp[0].str); (yyval.node) = (Node *) n; } break; @@ -18290,8 +18067,8 @@ yyreduce: { CommentStmt *n = makeNode(CommentStmt); n->objtype = OBJECT_TSTEMPLATE; - n->objname = (yyvsp[(6) - (8)].list); - n->comment = (yyvsp[(8) - (8)].str); + n->objname = (yyvsp[-2].list); + n->comment = (yyvsp[0].str); (yyval.node) = (Node *) n; } break; @@ -18301,8 +18078,8 @@ yyreduce: { CommentStmt *n = makeNode(CommentStmt); n->objtype = OBJECT_TSCONFIGURATION; - n->objname = (yyvsp[(6) - (8)].list); - n->comment = (yyvsp[(8) - (8)].str); + n->objname = (yyvsp[-2].list); + n->comment = (yyvsp[0].str); (yyval.node) = (Node *) n; } break; @@ -18369,7 +18146,7 @@ yyreduce: case 569: #line 3598 "gram.y" - { (yyval.str) = (yyvsp[(1) - (1)].str); } + { (yyval.str) = (yyvsp[0].str); } break; case 570: @@ -18380,8 +18157,8 @@ yyreduce: case 571: #line 3610 "gram.y" { - FetchStmt *n = (FetchStmt *) (yyvsp[(2) - (4)].node); - n->portalname = (yyvsp[(4) - (4)].str); + FetchStmt *n = (FetchStmt *) (yyvsp[-2].node); + n->portalname = (yyvsp[0].str); n->ismove = FALSE; (yyval.node) = (Node *)n; } @@ -18393,7 +18170,7 @@ yyreduce: FetchStmt *n = makeNode(FetchStmt); n->direction = FETCH_FORWARD; n->howMany = 1; - n->portalname = (yyvsp[(2) - (2)].str); + n->portalname = (yyvsp[0].str); n->ismove = FALSE; (yyval.node) = (Node *)n; } @@ -18402,8 +18179,8 @@ yyreduce: case 573: #line 3626 "gram.y" { - FetchStmt *n = (FetchStmt *) (yyvsp[(2) - (4)].node); - n->portalname = (yyvsp[(4) - (4)].str); + FetchStmt *n = (FetchStmt *) (yyvsp[-2].node); + n->portalname = (yyvsp[0].str); n->ismove = TRUE; (yyval.node) = (Node *)n; } @@ -18415,7 +18192,7 @@ yyreduce: FetchStmt *n = makeNode(FetchStmt); n->direction = FETCH_FORWARD; n->howMany = 1; - n->portalname = (yyvsp[(2) - (2)].str); + n->portalname = (yyvsp[0].str); n->ismove = TRUE; (yyval.node) = (Node *)n; } @@ -18476,7 +18253,7 @@ yyreduce: { FetchStmt *n = makeNode(FetchStmt); n->direction = FETCH_ABSOLUTE; - n->howMany = (yyvsp[(2) - (2)].ival); + n->howMany = (yyvsp[0].ival); (yyval.node) = (Node *)n; } break; @@ -18486,7 +18263,7 @@ yyreduce: { FetchStmt *n = makeNode(FetchStmt); n->direction = FETCH_RELATIVE; - n->howMany = (yyvsp[(2) - (2)].ival); + n->howMany = (yyvsp[0].ival); (yyval.node) = (Node *)n; } break; @@ -18496,7 +18273,7 @@ yyreduce: { FetchStmt *n = makeNode(FetchStmt); n->direction = FETCH_FORWARD; - n->howMany = (yyvsp[(1) - (1)].ival); + n->howMany = (yyvsp[0].ival); (yyval.node) = (Node *)n; } break; @@ -18526,7 +18303,7 @@ yyreduce: { FetchStmt *n = makeNode(FetchStmt); n->direction = FETCH_FORWARD; - n->howMany = (yyvsp[(2) - (2)].ival); + n->howMany = (yyvsp[0].ival); (yyval.node) = (Node *)n; } break; @@ -18556,7 +18333,7 @@ yyreduce: { FetchStmt *n = makeNode(FetchStmt); n->direction = FETCH_BACKWARD; - n->howMany = (yyvsp[(2) - (2)].ival); + n->howMany = (yyvsp[0].ival); (yyval.node) = (Node *)n; } break; @@ -18586,11 +18363,11 @@ yyreduce: { GrantStmt *n = makeNode(GrantStmt); n->is_grant = true; - n->privileges = (yyvsp[(2) - (7)].list); - n->objtype = ((yyvsp[(4) - (7)].privtarget))->objtype; - n->objects = ((yyvsp[(4) - (7)].privtarget))->objs; - n->grantees = (yyvsp[(6) - (7)].list); - n->grant_option = (yyvsp[(7) - (7)].boolean); + n->privileges = (yyvsp[-5].list); + n->objtype = ((yyvsp[-3].privtarget))->objtype; + n->objects = ((yyvsp[-3].privtarget))->objs; + n->grantees = (yyvsp[-1].list); + n->grant_option = (yyvsp[0].boolean); (yyval.node) = (Node*)n; } break; @@ -18601,11 +18378,11 @@ yyreduce: GrantStmt *n = makeNode(GrantStmt); n->is_grant = false; n->grant_option = false; - n->privileges = (yyvsp[(2) - (7)].list); - n->objtype = ((yyvsp[(4) - (7)].privtarget))->objtype; - n->objects = ((yyvsp[(4) - (7)].privtarget))->objs; - n->grantees = (yyvsp[(6) - (7)].list); - n->behavior = (yyvsp[(7) - (7)].dbehavior); + n->privileges = (yyvsp[-5].list); + n->objtype = ((yyvsp[-3].privtarget))->objtype; + n->objects = ((yyvsp[-3].privtarget))->objs; + n->grantees = (yyvsp[-1].list); + n->behavior = (yyvsp[0].dbehavior); (yyval.node) = (Node *)n; } break; @@ -18616,18 +18393,18 @@ yyreduce: GrantStmt *n = makeNode(GrantStmt); n->is_grant = false; n->grant_option = true; - n->privileges = (yyvsp[(5) - (10)].list); - n->objtype = ((yyvsp[(7) - (10)].privtarget))->objtype; - n->objects = ((yyvsp[(7) - (10)].privtarget))->objs; - n->grantees = (yyvsp[(9) - (10)].list); - n->behavior = (yyvsp[(10) - (10)].dbehavior); + n->privileges = (yyvsp[-5].list); + n->objtype = ((yyvsp[-3].privtarget))->objtype; + n->objects = ((yyvsp[-3].privtarget))->objs; + n->grantees = (yyvsp[-1].list); + n->behavior = (yyvsp[0].dbehavior); (yyval.node) = (Node *)n; } break; case 595: #line 3817 "gram.y" - { (yyval.list) = (yyvsp[(1) - (1)].list); } + { (yyval.list) = (yyvsp[0].list); } break; case 596: @@ -18642,32 +18419,32 @@ yyreduce: case 598: #line 3825 "gram.y" - { (yyval.list) = list_make1(makeString((yyvsp[(1) - (1)].str))); } + { (yyval.list) = list_make1(makeString((yyvsp[0].str))); } break; case 599: #line 3827 "gram.y" - { (yyval.list) = lappend((yyvsp[(1) - (3)].list), makeString((yyvsp[(3) - (3)].str))); } + { (yyval.list) = lappend((yyvsp[-2].list), makeString((yyvsp[0].str))); } break; case 600: #line 3830 "gram.y" - { (yyval.str) = pstrdup((yyvsp[(1) - (1)].keyword)); } + { (yyval.str) = pstrdup((yyvsp[0].keyword)); } break; case 601: #line 3831 "gram.y" - { (yyval.str) = pstrdup((yyvsp[(1) - (1)].keyword)); } + { (yyval.str) = pstrdup((yyvsp[0].keyword)); } break; case 602: #line 3832 "gram.y" - { (yyval.str) = pstrdup((yyvsp[(1) - (1)].keyword)); } + { (yyval.str) = pstrdup((yyvsp[0].keyword)); } break; case 603: #line 3833 "gram.y" - { (yyval.str) = (yyvsp[(1) - (1)].str); } + { (yyval.str) = (yyvsp[0].str); } break; case 604: @@ -18675,7 +18452,7 @@ yyreduce: { PrivTarget *n = makeNode(PrivTarget); n->objtype = ACL_OBJECT_RELATION; - n->objs = (yyvsp[(1) - (1)].list); + n->objs = (yyvsp[0].list); (yyval.privtarget) = n; } break; @@ -18685,7 +18462,7 @@ yyreduce: { PrivTarget *n = makeNode(PrivTarget); n->objtype = ACL_OBJECT_RELATION; - n->objs = (yyvsp[(2) - (2)].list); + n->objs = (yyvsp[0].list); (yyval.privtarget) = n; } break; @@ -18695,7 +18472,7 @@ yyreduce: { PrivTarget *n = makeNode(PrivTarget); n->objtype = ACL_OBJECT_SEQUENCE; - n->objs = (yyvsp[(2) - (2)].list); + n->objs = (yyvsp[0].list); (yyval.privtarget) = n; } break; @@ -18705,7 +18482,7 @@ yyreduce: { PrivTarget *n = makeNode(PrivTarget); n->objtype = ACL_OBJECT_FUNCTION; - n->objs = (yyvsp[(2) - (2)].list); + n->objs = (yyvsp[0].list); (yyval.privtarget) = n; } break; @@ -18715,7 +18492,7 @@ yyreduce: { PrivTarget *n = makeNode(PrivTarget); n->objtype = ACL_OBJECT_DATABASE; - n->objs = (yyvsp[(2) - (2)].list); + n->objs = (yyvsp[0].list); (yyval.privtarget) = n; } break; @@ -18725,7 +18502,7 @@ yyreduce: { PrivTarget *n = makeNode(PrivTarget); n->objtype = ACL_OBJECT_LANGUAGE; - n->objs = (yyvsp[(2) - (2)].list); + n->objs = (yyvsp[0].list); (yyval.privtarget) = n; } break; @@ -18735,7 +18512,7 @@ yyreduce: { PrivTarget *n = makeNode(PrivTarget); n->objtype = ACL_OBJECT_NAMESPACE; - n->objs = (yyvsp[(2) - (2)].list); + n->objs = (yyvsp[0].list); (yyval.privtarget) = n; } break; @@ -18745,19 +18522,19 @@ yyreduce: { PrivTarget *n = makeNode(PrivTarget); n->objtype = ACL_OBJECT_TABLESPACE; - n->objs = (yyvsp[(2) - (2)].list); + n->objs = (yyvsp[0].list); (yyval.privtarget) = n; } break; case 612: #line 3901 "gram.y" - { (yyval.list) = list_make1((yyvsp[(1) - (1)].node)); } + { (yyval.list) = list_make1((yyvsp[0].node)); } break; case 613: #line 3902 "gram.y" - { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); } + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].node)); } break; case 614: @@ -18765,10 +18542,10 @@ yyreduce: { PrivGrantee *n = makeNode(PrivGrantee); /* This hack lets us avoid reserving PUBLIC as a keyword*/ - if (strcmp((yyvsp[(1) - (1)].str), "public") == 0) + if (strcmp((yyvsp[0].str), "public") == 0) n->rolname = NULL; else - n->rolname = (yyvsp[(1) - (1)].str); + n->rolname = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -18778,10 +18555,10 @@ yyreduce: { PrivGrantee *n = makeNode(PrivGrantee); /* Treat GROUP PUBLIC as a synonym for PUBLIC */ - if (strcmp((yyvsp[(2) - (2)].str), "public") == 0) + if (strcmp((yyvsp[0].str), "public") == 0) n->rolname = NULL; else - n->rolname = (yyvsp[(2) - (2)].str); + n->rolname = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -18798,20 +18575,20 @@ yyreduce: case 618: #line 3934 "gram.y" - { (yyval.list) = list_make1((yyvsp[(1) - (1)].funwithargs)); } + { (yyval.list) = list_make1((yyvsp[0].funwithargs)); } break; case 619: #line 3936 "gram.y" - { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].funwithargs)); } + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].funwithargs)); } break; case 620: #line 3941 "gram.y" { FuncWithArgs *n = makeNode(FuncWithArgs); - n->funcname = (yyvsp[(1) - (2)].list); - n->funcargs = extractArgTypes((yyvsp[(2) - (2)].list)); + n->funcname = (yyvsp[-1].list); + n->funcargs = extractArgTypes((yyvsp[0].list)); (yyval.funwithargs) = n; } break; @@ -18821,10 +18598,10 @@ yyreduce: { GrantRoleStmt *n = makeNode(GrantRoleStmt); n->is_grant = true; - n->granted_roles = (yyvsp[(2) - (6)].list); - n->grantee_roles = (yyvsp[(4) - (6)].list); - n->admin_opt = (yyvsp[(5) - (6)].boolean); - n->grantor = (yyvsp[(6) - (6)].str); + n->granted_roles = (yyvsp[-4].list); + n->grantee_roles = (yyvsp[-2].list); + n->admin_opt = (yyvsp[-1].boolean); + n->grantor = (yyvsp[0].str); (yyval.node) = (Node*)n; } break; @@ -18835,9 +18612,9 @@ yyreduce: GrantRoleStmt *n = makeNode(GrantRoleStmt); n->is_grant = false; n->admin_opt = false; - n->granted_roles = (yyvsp[(2) - (6)].list); - n->grantee_roles = (yyvsp[(4) - (6)].list); - n->behavior = (yyvsp[(6) - (6)].dbehavior); + n->granted_roles = (yyvsp[-4].list); + n->grantee_roles = (yyvsp[-2].list); + n->behavior = (yyvsp[0].dbehavior); (yyval.node) = (Node*)n; } break; @@ -18848,9 +18625,9 @@ yyreduce: GrantRoleStmt *n = makeNode(GrantRoleStmt); n->is_grant = false; n->admin_opt = true; - n->granted_roles = (yyvsp[(5) - (9)].list); - n->grantee_roles = (yyvsp[(7) - (9)].list); - n->behavior = (yyvsp[(9) - (9)].dbehavior); + n->granted_roles = (yyvsp[-4].list); + n->grantee_roles = (yyvsp[-2].list); + n->behavior = (yyvsp[0].dbehavior); (yyval.node) = (Node*)n; } break; @@ -18867,7 +18644,7 @@ yyreduce: case 626: #line 3995 "gram.y" - { (yyval.str) = (yyvsp[(3) - (3)].str); } + { (yyval.str) = (yyvsp[0].str); } break; case 627: @@ -18879,15 +18656,15 @@ yyreduce: #line 4014 "gram.y" { IndexStmt *n = makeNode(IndexStmt); - n->unique = (yyvsp[(2) - (13)].boolean); + n->unique = (yyvsp[-11].boolean); n->concurrent = false; - n->idxname = (yyvsp[(4) - (13)].str); - n->relation = (yyvsp[(6) - (13)].range); - n->accessMethod = (yyvsp[(7) - (13)].str); - n->indexParams = (yyvsp[(9) - (13)].list); - n->options = (yyvsp[(11) - (13)].list); - n->tableSpace = (yyvsp[(12) - (13)].str); - n->whereClause = (yyvsp[(13) - (13)].node); + n->idxname = (yyvsp[-9].str); + n->relation = (yyvsp[-7].range); + n->accessMethod = (yyvsp[-6].str); + n->indexParams = (yyvsp[-4].list); + n->options = (yyvsp[-2].list); + n->tableSpace = (yyvsp[-1].str); + n->whereClause = (yyvsp[0].node); (yyval.node) = (Node *)n; } break; @@ -18896,15 +18673,15 @@ yyreduce: #line 4030 "gram.y" { IndexStmt *n = makeNode(IndexStmt); - n->unique = (yyvsp[(2) - (14)].boolean); + n->unique = (yyvsp[-12].boolean); n->concurrent = true; - n->idxname = (yyvsp[(5) - (14)].str); - n->relation = (yyvsp[(7) - (14)].range); - n->accessMethod = (yyvsp[(8) - (14)].str); - n->indexParams = (yyvsp[(10) - (14)].list); - n->options = (yyvsp[(12) - (14)].list); - n->tableSpace = (yyvsp[(13) - (14)].str); - n->whereClause = (yyvsp[(14) - (14)].node); + n->idxname = (yyvsp[-9].str); + n->relation = (yyvsp[-7].range); + n->accessMethod = (yyvsp[-6].str); + n->indexParams = (yyvsp[-4].list); + n->options = (yyvsp[-2].list); + n->tableSpace = (yyvsp[-1].str); + n->whereClause = (yyvsp[0].node); (yyval.node) = (Node *)n; } break; @@ -18921,7 +18698,7 @@ yyreduce: case 632: #line 4051 "gram.y" - { (yyval.str) = (yyvsp[(2) - (2)].str); } + { (yyval.str) = (yyvsp[0].str); } break; case 633: @@ -18931,23 +18708,23 @@ yyreduce: case 634: #line 4055 "gram.y" - { (yyval.list) = list_make1((yyvsp[(1) - (1)].ielem)); } + { (yyval.list) = list_make1((yyvsp[0].ielem)); } break; case 635: #line 4056 "gram.y" - { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].ielem)); } + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].ielem)); } break; case 636: #line 4065 "gram.y" { (yyval.ielem) = makeNode(IndexElem); - (yyval.ielem)->name = (yyvsp[(1) - (4)].str); + (yyval.ielem)->name = (yyvsp[-3].str); (yyval.ielem)->expr = NULL; - (yyval.ielem)->opclass = (yyvsp[(2) - (4)].list); - (yyval.ielem)->ordering = (yyvsp[(3) - (4)].ival); - (yyval.ielem)->nulls_ordering = (yyvsp[(4) - (4)].ival); + (yyval.ielem)->opclass = (yyvsp[-2].list); + (yyval.ielem)->ordering = (yyvsp[-1].ival); + (yyval.ielem)->nulls_ordering = (yyvsp[0].ival); } break; @@ -18956,10 +18733,10 @@ yyreduce: { (yyval.ielem) = makeNode(IndexElem); (yyval.ielem)->name = NULL; - (yyval.ielem)->expr = (yyvsp[(1) - (4)].node); - (yyval.ielem)->opclass = (yyvsp[(2) - (4)].list); - (yyval.ielem)->ordering = (yyvsp[(3) - (4)].ival); - (yyval.ielem)->nulls_ordering = (yyvsp[(4) - (4)].ival); + (yyval.ielem)->expr = (yyvsp[-3].node); + (yyval.ielem)->opclass = (yyvsp[-2].list); + (yyval.ielem)->ordering = (yyvsp[-1].ival); + (yyval.ielem)->nulls_ordering = (yyvsp[0].ival); } break; @@ -18968,21 +18745,21 @@ yyreduce: { (yyval.ielem) = makeNode(IndexElem); (yyval.ielem)->name = NULL; - (yyval.ielem)->expr = (yyvsp[(2) - (6)].node); - (yyval.ielem)->opclass = (yyvsp[(4) - (6)].list); - (yyval.ielem)->ordering = (yyvsp[(5) - (6)].ival); - (yyval.ielem)->nulls_ordering = (yyvsp[(6) - (6)].ival); + (yyval.ielem)->expr = (yyvsp[-4].node); + (yyval.ielem)->opclass = (yyvsp[-2].list); + (yyval.ielem)->ordering = (yyvsp[-1].ival); + (yyval.ielem)->nulls_ordering = (yyvsp[0].ival); } break; case 639: #line 4093 "gram.y" - { (yyval.list) = (yyvsp[(1) - (1)].list); } + { (yyval.list) = (yyvsp[0].list); } break; case 640: #line 4094 "gram.y" - { (yyval.list) = (yyvsp[(2) - (2)].list); } + { (yyval.list) = (yyvsp[0].list); } break; case 641: @@ -19024,12 +18801,12 @@ yyreduce: #line 4123 "gram.y" { CreateFunctionStmt *n = makeNode(CreateFunctionStmt); - n->replace = (yyvsp[(2) - (9)].boolean); - n->funcname = (yyvsp[(4) - (9)].list); - n->parameters = (yyvsp[(5) - (9)].list); - n->returnType = (yyvsp[(7) - (9)].typnam); - n->options = (yyvsp[(8) - (9)].list); - n->withClause = (yyvsp[(9) - (9)].list); + n->replace = (yyvsp[-7].boolean); + n->funcname = (yyvsp[-5].list); + n->parameters = (yyvsp[-4].list); + n->returnType = (yyvsp[-2].typnam); + n->options = (yyvsp[-1].list); + n->withClause = (yyvsp[0].list); (yyval.node) = (Node *)n; } break; @@ -19038,12 +18815,12 @@ yyreduce: #line 4135 "gram.y" { CreateFunctionStmt *n = makeNode(CreateFunctionStmt); - n->replace = (yyvsp[(2) - (7)].boolean); - n->funcname = (yyvsp[(4) - (7)].list); - n->parameters = (yyvsp[(5) - (7)].list); + n->replace = (yyvsp[-5].boolean); + n->funcname = (yyvsp[-3].list); + n->parameters = (yyvsp[-2].list); n->returnType = NULL; - n->options = (yyvsp[(6) - (7)].list); - n->withClause = (yyvsp[(7) - (7)].list); + n->options = (yyvsp[-1].list); + n->withClause = (yyvsp[0].list); (yyval.node) = (Node *)n; } break; @@ -19060,7 +18837,7 @@ yyreduce: case 652: #line 4152 "gram.y" - { (yyval.list) = (yyvsp[(2) - (3)].list); } + { (yyval.list) = (yyvsp[-1].list); } break; case 653: @@ -19070,21 +18847,21 @@ yyreduce: case 654: #line 4157 "gram.y" - { (yyval.list) = list_make1((yyvsp[(1) - (1)].fun_param)); } + { (yyval.list) = list_make1((yyvsp[0].fun_param)); } break; case 655: #line 4158 "gram.y" - { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].fun_param)); } + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].fun_param)); } break; case 656: #line 4173 "gram.y" { FunctionParameter *n = makeNode(FunctionParameter); - n->name = (yyvsp[(2) - (3)].str); - n->argType = (yyvsp[(3) - (3)].typnam); - n->mode = (yyvsp[(1) - (3)].fun_param_mode); + n->name = (yyvsp[-1].str); + n->argType = (yyvsp[0].typnam); + n->mode = (yyvsp[-2].fun_param_mode); (yyval.fun_param) = n; } break; @@ -19093,9 +18870,9 @@ yyreduce: #line 4181 "gram.y" { FunctionParameter *n = makeNode(FunctionParameter); - n->name = (yyvsp[(1) - (3)].str); - n->argType = (yyvsp[(3) - (3)].typnam); - n->mode = (yyvsp[(2) - (3)].fun_param_mode); + n->name = (yyvsp[-2].str); + n->argType = (yyvsp[0].typnam); + n->mode = (yyvsp[-1].fun_param_mode); (yyval.fun_param) = n; } break; @@ -19104,8 +18881,8 @@ yyreduce: #line 4189 "gram.y" { FunctionParameter *n = makeNode(FunctionParameter); - n->name = (yyvsp[(1) - (2)].str); - n->argType = (yyvsp[(2) - (2)].typnam); + n->name = (yyvsp[-1].str); + n->argType = (yyvsp[0].typnam); n->mode = FUNC_PARAM_IN; (yyval.fun_param) = n; } @@ -19116,8 +18893,8 @@ yyreduce: { FunctionParameter *n = makeNode(FunctionParameter); n->name = NULL; - n->argType = (yyvsp[(2) - (2)].typnam); - n->mode = (yyvsp[(1) - (2)].fun_param_mode); + n->argType = (yyvsp[0].typnam); + n->mode = (yyvsp[-1].fun_param_mode); (yyval.fun_param) = n; } break; @@ -19127,7 +18904,7 @@ yyreduce: { FunctionParameter *n = makeNode(FunctionParameter); n->name = NULL; - n->argType = (yyvsp[(1) - (1)].typnam); + n->argType = (yyvsp[0].typnam); n->mode = FUNC_PARAM_IN; (yyval.fun_param) = n; } @@ -19160,42 +18937,42 @@ yyreduce: * but for now better to silently swallow typmod, etc. * - thomas 2000-03-22 */ - (yyval.typnam) = (yyvsp[(1) - (1)].typnam); + (yyval.typnam) = (yyvsp[0].typnam); } break; case 667: #line 4243 "gram.y" - { (yyval.typnam) = (yyvsp[(1) - (1)].typnam); } + { (yyval.typnam) = (yyvsp[0].typnam); } break; case 668: #line 4245 "gram.y" { - (yyval.typnam) = makeTypeNameFromNameList(lcons(makeString((yyvsp[(1) - (4)].str)), (yyvsp[(2) - (4)].list))); + (yyval.typnam) = makeTypeNameFromNameList(lcons(makeString((yyvsp[-3].str)), (yyvsp[-2].list))); (yyval.typnam)->pct_type = true; - (yyval.typnam)->location = (yylsp[(1) - (4)]); + (yyval.typnam)->location = (yylsp[-3]); } break; case 669: #line 4251 "gram.y" { - (yyval.typnam) = makeTypeNameFromNameList(lcons(makeString((yyvsp[(2) - (5)].str)), (yyvsp[(3) - (5)].list))); + (yyval.typnam) = makeTypeNameFromNameList(lcons(makeString((yyvsp[-3].str)), (yyvsp[-2].list))); (yyval.typnam)->pct_type = true; (yyval.typnam)->setof = TRUE; - (yyval.typnam)->location = (yylsp[(2) - (5)]); + (yyval.typnam)->location = (yylsp[-3]); } break; case 670: #line 4262 "gram.y" - { (yyval.list) = list_make1((yyvsp[(1) - (1)].defelt)); } + { (yyval.list) = list_make1((yyvsp[0].defelt)); } break; case 671: #line 4263 "gram.y" - { (yyval.list) = lappend((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].defelt)); } + { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].defelt)); } break; case 672: @@ -19271,14 +19048,14 @@ yyreduce: case 682: #line 4311 "gram.y" { - (yyval.defelt) = makeDefElem("cost", (Node *)(yyvsp[(2) - (2)].value)); + (yyval.defelt) = makeDefElem("cost", (Node *)(yyvsp[0].value)); } break; case 683: #line 4315 "gram.y" { - (yyval.defelt) = makeDefElem("rows", (Node *)(yyvsp[(2) - (2)].value)); + (yyval.defelt) = makeDefElem("rows", (Node *)(yyvsp[0].value)); } break; @@ -19286,46 +19063,46 @@ yyreduce: #line 4319 "gram.y" { /* we abuse the normal content of a DefElem here */ - (yyval.defelt) = makeDefElem("set", (Node *)(yyvsp[(1) - (1)].vsetstmt)); + (yyval.defelt) = makeDefElem("set", (Node *)(yyvsp[0].vsetstmt)); } break; case 685: #line 4327 "gram.y" { - (yyval.defelt) = makeDefElem("as", (Node *)(yyvsp[(2) - (2)].list)); + (yyval.defelt) = makeDefElem("as", (Node *)(yyvsp[0].list)); } break; case 686: #line 4331 "gram.y" { - (yyval.defelt) = makeDefElem("language", (Node *)makeString((yyvsp[(2) - (2)].str))); + (yyval.defelt) = makeDefElem("language", (Node *)makeString((yyvsp[0].str))); } break; case 687: #line 4335 "gram.y" { - (yyval.defelt) = (yyvsp[(1) - (1)].defelt); + (yyval.defelt) = (yyvsp[0].defelt); } break; case 688: #line 4340 "gram.y" - { (yyval.list) = list_make1(makeString((yyvsp[(1) - (1)].str))); } + { (yyval.list) = list_make1(makeString((yyvsp[0].str))); } break; case 689: #line 4342 "gram.y" { - (yyval.list) = list_make2(makeString((yyvsp[(1) - (3)].str)), makeString((yyvsp[(3) - (3)].str))); + (yyval.list) = list_make2(makeString((yyvsp[-2].str)), makeString((yyvsp[0].str))); } break; case 690: #line 4348 "gram.y" - { (yyval.list) = (yyvsp[(2) - (2)].list); } + { (yyval.list) = (yyvsp[0].list); } break; case 691: @@ -19337,20 +19114,20 @@ yyreduce: #line 4362 "gram.y" { AlterFunctionStmt *n = makeNode(AlterFunctionStmt); - n->func = (yyvsp[(3) - (5)].funwithargs); - n->actions = (yyvsp[(4) - (5)].list); + n->func = (yyvsp[-2].funwithargs); + n->actions = (yyvsp[-1].list); (yyval.node) = (Node *) n; } break; case 693: #line 4372 "gram.y" - { (yyval.list) = list_make1((yyvsp[(1) - (1)].defelt)); } + { (yyval.list) = list_make1((yyvsp[0].defelt)); } break; case 694: #line 4373 "gram.y" - { (yyval.list) = lappend((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].defelt)); } + { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].defelt)); } break; case 697: @@ -19358,9 +19135,9 @@ yyreduce: { RemoveFuncStmt *n = makeNode(RemoveFuncStmt); n->kind = OBJECT_FUNCTION; - n->name = (yyvsp[(3) - (5)].list); - n->args = extractArgTypes((yyvsp[(4) - (5)].list)); - n->behavior = (yyvsp[(5) - (5)].dbehavior); + n->name = (yyvsp[-2].list); + n->args = extractArgTypes((yyvsp[-1].list)); + n->behavior = (yyvsp[0].dbehavior); n->missing_ok = false; (yyval.node) = (Node *)n; } @@ -19371,9 +19148,9 @@ yyreduce: { RemoveFuncStmt *n = makeNode(RemoveFuncStmt); n->kind = OBJECT_FUNCTION; - n->name = (yyvsp[(5) - (7)].list); - n->args = extractArgTypes((yyvsp[(6) - (7)].list)); - n->behavior = (yyvsp[(7) - (7)].dbehavior); + n->name = (yyvsp[-2].list); + n->args = extractArgTypes((yyvsp[-1].list)); + n->behavior = (yyvsp[0].dbehavior); n->missing_ok = true; (yyval.node) = (Node *)n; } @@ -19384,9 +19161,9 @@ yyreduce: { RemoveFuncStmt *n = makeNode(RemoveFuncStmt); n->kind = OBJECT_AGGREGATE; - n->name = (yyvsp[(3) - (5)].list); - n->args = (yyvsp[(4) - (5)].list); - n->behavior = (yyvsp[(5) - (5)].dbehavior); + n->name = (yyvsp[-2].list); + n->args = (yyvsp[-1].list); + n->behavior = (yyvsp[0].dbehavior); n->missing_ok = false; (yyval.node) = (Node *)n; } @@ -19397,9 +19174,9 @@ yyreduce: { RemoveFuncStmt *n = makeNode(RemoveFuncStmt); n->kind = OBJECT_AGGREGATE; - n->name = (yyvsp[(5) - (7)].list); - n->args = (yyvsp[(6) - (7)].list); - n->behavior = (yyvsp[(7) - (7)].dbehavior); + n->name = (yyvsp[-2].list); + n->args = (yyvsp[-1].list); + n->behavior = (yyvsp[0].dbehavior); n->missing_ok = true; (yyval.node) = (Node *)n; } @@ -19410,9 +19187,9 @@ yyreduce: { RemoveFuncStmt *n = makeNode(RemoveFuncStmt); n->kind = OBJECT_OPERATOR; - n->name = (yyvsp[(3) - (7)].list); - n->args = (yyvsp[(5) - (7)].list); - n->behavior = (yyvsp[(7) - (7)].dbehavior); + n->name = (yyvsp[-4].list); + n->args = (yyvsp[-2].list); + n->behavior = (yyvsp[0].dbehavior); n->missing_ok = false; (yyval.node) = (Node *)n; } @@ -19423,9 +19200,9 @@ yyreduce: { RemoveFuncStmt *n = makeNode(RemoveFuncStmt); n->kind = OBJECT_OPERATOR; - n->name = (yyvsp[(5) - (9)].list); - n->args = (yyvsp[(7) - (9)].list); - n->behavior = (yyvsp[(9) - (9)].dbehavior); + n->name = (yyvsp[-4].list); + n->args = (yyvsp[-2].list); + n->behavior = (yyvsp[0].dbehavior); n->missing_ok = true; (yyval.node) = (Node *)n; } @@ -19443,37 +19220,37 @@ yyreduce: case 704: #line 4471 "gram.y" - { (yyval.list) = list_make2((yyvsp[(1) - (3)].typnam), (yyvsp[(3) - (3)].typnam)); } + { (yyval.list) = list_make2((yyvsp[-2].typnam), (yyvsp[0].typnam)); } break; case 705: #line 4473 "gram.y" - { (yyval.list) = list_make2(NULL, (yyvsp[(3) - (3)].typnam)); } + { (yyval.list) = list_make2(NULL, (yyvsp[0].typnam)); } break; case 706: #line 4475 "gram.y" - { (yyval.list) = list_make2((yyvsp[(1) - (3)].typnam), NULL); } + { (yyval.list) = list_make2((yyvsp[-2].typnam), NULL); } break; case 707: #line 4480 "gram.y" - { (yyval.list) = list_make1(makeString((yyvsp[(1) - (1)].str))); } + { (yyval.list) = list_make1(makeString((yyvsp[0].str))); } break; case 708: #line 4482 "gram.y" - { (yyval.list) = lcons(makeString((yyvsp[(1) - (3)].str)), (yyvsp[(3) - (3)].list)); } + { (yyval.list) = lcons(makeString((yyvsp[-2].str)), (yyvsp[0].list)); } break; case 709: #line 4494 "gram.y" { CreateCastStmt *n = makeNode(CreateCastStmt); - n->sourcetype = (yyvsp[(4) - (11)].typnam); - n->targettype = (yyvsp[(6) - (11)].typnam); - n->func = (yyvsp[(10) - (11)].funwithargs); - n->context = (CoercionContext) (yyvsp[(11) - (11)].ival); + n->sourcetype = (yyvsp[-7].typnam); + n->targettype = (yyvsp[-5].typnam); + n->func = (yyvsp[-1].funwithargs); + n->context = (CoercionContext) (yyvsp[0].ival); (yyval.node) = (Node *)n; } break; @@ -19482,10 +19259,10 @@ yyreduce: #line 4504 "gram.y" { CreateCastStmt *n = makeNode(CreateCastStmt); - n->sourcetype = (yyvsp[(4) - (10)].typnam); - n->targettype = (yyvsp[(6) - (10)].typnam); + n->sourcetype = (yyvsp[-6].typnam); + n->targettype = (yyvsp[-4].typnam); n->func = NULL; - n->context = (CoercionContext) (yyvsp[(10) - (10)].ival); + n->context = (CoercionContext) (yyvsp[0].ival); (yyval.node) = (Node *)n; } break; @@ -19509,10 +19286,10 @@ yyreduce: #line 4521 "gram.y" { DropCastStmt *n = makeNode(DropCastStmt); - n->sourcetype = (yyvsp[(5) - (9)].typnam); - n->targettype = (yyvsp[(7) - (9)].typnam); - n->behavior = (yyvsp[(9) - (9)].dbehavior); - n->missing_ok = (yyvsp[(3) - (9)].boolean); + n->sourcetype = (yyvsp[-4].typnam); + n->targettype = (yyvsp[-2].typnam); + n->behavior = (yyvsp[0].dbehavior); + n->missing_ok = (yyvsp[-6].boolean); (yyval.node) = (Node *)n; } break; @@ -19531,8 +19308,8 @@ yyreduce: #line 4547 "gram.y" { ReindexStmt *n = makeNode(ReindexStmt); - n->kind = (yyvsp[(2) - (4)].objtype); - n->relation = (yyvsp[(3) - (4)].range); + n->kind = (yyvsp[-2].objtype); + n->relation = (yyvsp[-1].range); n->name = NULL; (yyval.node) = (Node *)n; } @@ -19543,7 +19320,7 @@ yyreduce: { ReindexStmt *n = makeNode(ReindexStmt); n->kind = OBJECT_DATABASE; - n->name = (yyvsp[(3) - (4)].str); + n->name = (yyvsp[-1].str); n->relation = NULL; n->do_system = true; n->do_user = false; @@ -19556,7 +19333,7 @@ yyreduce: { ReindexStmt *n = makeNode(ReindexStmt); n->kind = OBJECT_DATABASE; - n->name = (yyvsp[(3) - (4)].str); + n->name = (yyvsp[-1].str); n->relation = NULL; n->do_system = true; n->do_user = true; @@ -19589,9 +19366,9 @@ yyreduce: { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_AGGREGATE; - n->object = (yyvsp[(3) - (7)].list); - n->objarg = (yyvsp[(4) - (7)].list); - n->newname = (yyvsp[(7) - (7)].str); + n->object = (yyvsp[-4].list); + n->objarg = (yyvsp[-3].list); + n->newname = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -19601,8 +19378,8 @@ yyreduce: { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_CONVERSION; - n->object = (yyvsp[(3) - (6)].list); - n->newname = (yyvsp[(6) - (6)].str); + n->object = (yyvsp[-3].list); + n->newname = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -19612,8 +19389,8 @@ yyreduce: { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_DATABASE; - n->subname = (yyvsp[(3) - (6)].str); - n->newname = (yyvsp[(6) - (6)].str); + n->subname = (yyvsp[-3].str); + n->newname = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -19623,9 +19400,9 @@ yyreduce: { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_FUNCTION; - n->object = (yyvsp[(3) - (6)].funwithargs)->funcname; - n->objarg = (yyvsp[(3) - (6)].funwithargs)->funcargs; - n->newname = (yyvsp[(6) - (6)].str); + n->object = (yyvsp[-3].funwithargs)->funcname; + n->objarg = (yyvsp[-3].funwithargs)->funcargs; + n->newname = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -19635,8 +19412,8 @@ yyreduce: { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_ROLE; - n->subname = (yyvsp[(3) - (6)].str); - n->newname = (yyvsp[(6) - (6)].str); + n->subname = (yyvsp[-3].str); + n->newname = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -19646,8 +19423,8 @@ yyreduce: { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_LANGUAGE; - n->subname = (yyvsp[(4) - (7)].str); - n->newname = (yyvsp[(7) - (7)].str); + n->subname = (yyvsp[-3].str); + n->newname = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -19657,9 +19434,9 @@ yyreduce: { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_OPCLASS; - n->object = (yyvsp[(4) - (9)].list); - n->subname = (yyvsp[(6) - (9)].str); - n->newname = (yyvsp[(9) - (9)].str); + n->object = (yyvsp[-5].list); + n->subname = (yyvsp[-3].str); + n->newname = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -19669,9 +19446,9 @@ yyreduce: { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_OPFAMILY; - n->object = (yyvsp[(4) - (9)].list); - n->subname = (yyvsp[(6) - (9)].str); - n->newname = (yyvsp[(9) - (9)].str); + n->object = (yyvsp[-5].list); + n->subname = (yyvsp[-3].str); + n->newname = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -19681,8 +19458,8 @@ yyreduce: { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_SCHEMA; - n->subname = (yyvsp[(3) - (6)].str); - n->newname = (yyvsp[(6) - (6)].str); + n->subname = (yyvsp[-3].str); + n->newname = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -19692,9 +19469,9 @@ yyreduce: { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_TABLE; - n->relation = (yyvsp[(3) - (6)].range); + n->relation = (yyvsp[-3].range); n->subname = NULL; - n->newname = (yyvsp[(6) - (6)].str); + n->newname = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -19704,9 +19481,9 @@ yyreduce: { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_SEQUENCE; - n->relation = (yyvsp[(3) - (6)].range); + n->relation = (yyvsp[-3].range); n->subname = NULL; - n->newname = (yyvsp[(6) - (6)].str); + n->newname = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -19716,9 +19493,9 @@ yyreduce: { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_VIEW; - n->relation = (yyvsp[(3) - (6)].range); + n->relation = (yyvsp[-3].range); n->subname = NULL; - n->newname = (yyvsp[(6) - (6)].str); + n->newname = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -19728,9 +19505,9 @@ yyreduce: { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_INDEX; - n->relation = (yyvsp[(3) - (6)].range); + n->relation = (yyvsp[-3].range); n->subname = NULL; - n->newname = (yyvsp[(6) - (6)].str); + n->newname = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -19740,9 +19517,9 @@ yyreduce: { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_COLUMN; - n->relation = (yyvsp[(3) - (8)].range); - n->subname = (yyvsp[(6) - (8)].str); - n->newname = (yyvsp[(8) - (8)].str); + n->relation = (yyvsp[-5].range); + n->subname = (yyvsp[-2].str); + n->newname = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -19752,9 +19529,9 @@ yyreduce: { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_TRIGGER; - n->relation = (yyvsp[(5) - (8)].range); - n->subname = (yyvsp[(3) - (8)].str); - n->newname = (yyvsp[(8) - (8)].str); + n->relation = (yyvsp[-3].range); + n->subname = (yyvsp[-5].str); + n->newname = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -19764,8 +19541,8 @@ yyreduce: { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_ROLE; - n->subname = (yyvsp[(3) - (6)].str); - n->newname = (yyvsp[(6) - (6)].str); + n->subname = (yyvsp[-3].str); + n->newname = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -19775,8 +19552,8 @@ yyreduce: { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_ROLE; - n->subname = (yyvsp[(3) - (6)].str); - n->newname = (yyvsp[(6) - (6)].str); + n->subname = (yyvsp[-3].str); + n->newname = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -19786,8 +19563,8 @@ yyreduce: { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_TABLESPACE; - n->subname = (yyvsp[(3) - (6)].str); - n->newname = (yyvsp[(6) - (6)].str); + n->subname = (yyvsp[-3].str); + n->newname = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -19797,8 +19574,8 @@ yyreduce: { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_TSPARSER; - n->object = (yyvsp[(5) - (8)].list); - n->newname = (yyvsp[(8) - (8)].str); + n->object = (yyvsp[-3].list); + n->newname = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -19808,8 +19585,8 @@ yyreduce: { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_TSDICTIONARY; - n->object = (yyvsp[(5) - (8)].list); - n->newname = (yyvsp[(8) - (8)].str); + n->object = (yyvsp[-3].list); + n->newname = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -19819,8 +19596,8 @@ yyreduce: { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_TSTEMPLATE; - n->object = (yyvsp[(5) - (8)].list); - n->newname = (yyvsp[(8) - (8)].str); + n->object = (yyvsp[-3].list); + n->newname = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -19830,8 +19607,8 @@ yyreduce: { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_TSCONFIGURATION; - n->object = (yyvsp[(5) - (8)].list); - n->newname = (yyvsp[(8) - (8)].str); + n->object = (yyvsp[-3].list); + n->newname = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -19851,9 +19628,9 @@ yyreduce: { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); n->objectType = OBJECT_AGGREGATE; - n->object = (yyvsp[(3) - (7)].list); - n->objarg = (yyvsp[(4) - (7)].list); - n->newschema = (yyvsp[(7) - (7)].str); + n->object = (yyvsp[-4].list); + n->objarg = (yyvsp[-3].list); + n->newschema = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -19863,8 +19640,8 @@ yyreduce: { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); n->objectType = OBJECT_DOMAIN; - n->object = (yyvsp[(3) - (6)].list); - n->newschema = (yyvsp[(6) - (6)].str); + n->object = (yyvsp[-3].list); + n->newschema = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -19874,9 +19651,9 @@ yyreduce: { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); n->objectType = OBJECT_FUNCTION; - n->object = (yyvsp[(3) - (6)].funwithargs)->funcname; - n->objarg = (yyvsp[(3) - (6)].funwithargs)->funcargs; - n->newschema = (yyvsp[(6) - (6)].str); + n->object = (yyvsp[-3].funwithargs)->funcname; + n->objarg = (yyvsp[-3].funwithargs)->funcargs; + n->newschema = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -19886,8 +19663,8 @@ yyreduce: { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); n->objectType = OBJECT_SEQUENCE; - n->relation = (yyvsp[(3) - (6)].range); - n->newschema = (yyvsp[(6) - (6)].str); + n->relation = (yyvsp[-3].range); + n->newschema = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -19897,8 +19674,8 @@ yyreduce: { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); n->objectType = OBJECT_TABLE; - n->relation = (yyvsp[(3) - (6)].range); - n->newschema = (yyvsp[(6) - (6)].str); + n->relation = (yyvsp[-3].range); + n->newschema = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -19908,8 +19685,8 @@ yyreduce: { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); n->objectType = OBJECT_TYPE; - n->object = (yyvsp[(3) - (6)].list); - n->newschema = (yyvsp[(6) - (6)].str); + n->object = (yyvsp[-3].list); + n->newschema = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -19919,9 +19696,9 @@ yyreduce: { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); n->objectType = OBJECT_AGGREGATE; - n->object = (yyvsp[(3) - (7)].list); - n->objarg = (yyvsp[(4) - (7)].list); - n->newowner = (yyvsp[(7) - (7)].str); + n->object = (yyvsp[-4].list); + n->objarg = (yyvsp[-3].list); + n->newowner = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -19931,8 +19708,8 @@ yyreduce: { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); n->objectType = OBJECT_CONVERSION; - n->object = (yyvsp[(3) - (6)].list); - n->newowner = (yyvsp[(6) - (6)].str); + n->object = (yyvsp[-3].list); + n->newowner = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -19942,8 +19719,8 @@ yyreduce: { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); n->objectType = OBJECT_DATABASE; - n->object = list_make1((yyvsp[(3) - (6)].str)); - n->newowner = (yyvsp[(6) - (6)].str); + n->object = list_make1((yyvsp[-3].str)); + n->newowner = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -19953,8 +19730,8 @@ yyreduce: { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); n->objectType = OBJECT_DOMAIN; - n->object = (yyvsp[(3) - (6)].list); - n->newowner = (yyvsp[(6) - (6)].str); + n->object = (yyvsp[-3].list); + n->newowner = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -19964,9 +19741,9 @@ yyreduce: { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); n->objectType = OBJECT_FUNCTION; - n->object = (yyvsp[(3) - (6)].funwithargs)->funcname; - n->objarg = (yyvsp[(3) - (6)].funwithargs)->funcargs; - n->newowner = (yyvsp[(6) - (6)].str); + n->object = (yyvsp[-3].funwithargs)->funcname; + n->objarg = (yyvsp[-3].funwithargs)->funcargs; + n->newowner = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -19976,8 +19753,8 @@ yyreduce: { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); n->objectType = OBJECT_LANGUAGE; - n->object = list_make1((yyvsp[(4) - (7)].str)); - n->newowner = (yyvsp[(7) - (7)].str); + n->object = list_make1((yyvsp[-3].str)); + n->newowner = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -19987,9 +19764,9 @@ yyreduce: { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); n->objectType = OBJECT_OPERATOR; - n->object = (yyvsp[(3) - (9)].list); - n->objarg = (yyvsp[(5) - (9)].list); - n->newowner = (yyvsp[(9) - (9)].str); + n->object = (yyvsp[-6].list); + n->objarg = (yyvsp[-4].list); + n->newowner = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -19999,9 +19776,9 @@ yyreduce: { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); n->objectType = OBJECT_OPCLASS; - n->object = (yyvsp[(4) - (9)].list); - n->addname = (yyvsp[(6) - (9)].str); - n->newowner = (yyvsp[(9) - (9)].str); + n->object = (yyvsp[-5].list); + n->addname = (yyvsp[-3].str); + n->newowner = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -20011,9 +19788,9 @@ yyreduce: { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); n->objectType = OBJECT_OPFAMILY; - n->object = (yyvsp[(4) - (9)].list); - n->addname = (yyvsp[(6) - (9)].str); - n->newowner = (yyvsp[(9) - (9)].str); + n->object = (yyvsp[-5].list); + n->addname = (yyvsp[-3].str); + n->newowner = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -20023,8 +19800,8 @@ yyreduce: { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); n->objectType = OBJECT_SCHEMA; - n->object = list_make1((yyvsp[(3) - (6)].str)); - n->newowner = (yyvsp[(6) - (6)].str); + n->object = list_make1((yyvsp[-3].str)); + n->newowner = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -20034,8 +19811,8 @@ yyreduce: { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); n->objectType = OBJECT_TYPE; - n->object = (yyvsp[(3) - (6)].list); - n->newowner = (yyvsp[(6) - (6)].str); + n->object = (yyvsp[-3].list); + n->newowner = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -20045,8 +19822,8 @@ yyreduce: { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); n->objectType = OBJECT_TABLESPACE; - n->object = list_make1((yyvsp[(3) - (6)].str)); - n->newowner = (yyvsp[(6) - (6)].str); + n->object = list_make1((yyvsp[-3].str)); + n->newowner = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -20056,8 +19833,8 @@ yyreduce: { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); n->objectType = OBJECT_TSDICTIONARY; - n->object = (yyvsp[(5) - (8)].list); - n->newowner = (yyvsp[(8) - (8)].str); + n->object = (yyvsp[-3].list); + n->newowner = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -20067,8 +19844,8 @@ yyreduce: { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); n->objectType = OBJECT_TSCONFIGURATION; - n->object = (yyvsp[(5) - (8)].list); - n->newowner = (yyvsp[(8) - (8)].str); + n->object = (yyvsp[-3].list); + n->newowner = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -20082,13 +19859,13 @@ yyreduce: #line 4979 "gram.y" { RuleStmt *n = makeNode(RuleStmt); - n->replace = (yyvsp[(2) - (14)].boolean); - n->relation = (yyvsp[(10) - (14)].range); - n->rulename = (yyvsp[(4) - (14)].str); - n->whereClause = (yyvsp[(11) - (14)].node); - n->event = (yyvsp[(8) - (14)].ival); - n->instead = (yyvsp[(13) - (14)].boolean); - n->actions = (yyvsp[(14) - (14)].list); + n->replace = (yyvsp[-12].boolean); + n->relation = (yyvsp[-4].range); + n->rulename = (yyvsp[-10].str); + n->whereClause = (yyvsp[-3].node); + n->event = (yyvsp[-6].ival); + n->instead = (yyvsp[-1].boolean); + n->actions = (yyvsp[0].list); (yyval.node) = (Node *)n; QueryIsRule=FALSE; } @@ -20101,27 +19878,27 @@ yyreduce: case 771: #line 4995 "gram.y" - { (yyval.list) = list_make1((yyvsp[(1) - (1)].node)); } + { (yyval.list) = list_make1((yyvsp[0].node)); } break; case 772: #line 4996 "gram.y" - { (yyval.list) = (yyvsp[(2) - (3)].list); } + { (yyval.list) = (yyvsp[-1].list); } break; case 773: #line 5002 "gram.y" - { if ((yyvsp[(3) - (3)].node) != NULL) - (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); + { if ((yyvsp[0].node) != NULL) + (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].node)); else - (yyval.list) = (yyvsp[(1) - (3)].list); + (yyval.list) = (yyvsp[-2].list); } break; case 774: #line 5008 "gram.y" - { if ((yyvsp[(1) - (1)].node) != NULL) - (yyval.list) = list_make1((yyvsp[(1) - (1)].node)); + { if ((yyvsp[0].node) != NULL) + (yyval.list) = list_make1((yyvsp[0].node)); else (yyval.list) = NIL; } @@ -20129,7 +19906,7 @@ yyreduce: case 780: #line 5024 "gram.y" - { (yyval.node) = (yyvsp[(1) - (1)].node); } + { (yyval.node) = (yyvsp[0].node); } break; case 781: @@ -20176,9 +19953,9 @@ yyreduce: #line 5043 "gram.y" { DropPropertyStmt *n = makeNode(DropPropertyStmt); - n->relation = (yyvsp[(5) - (6)].range); - n->property = (yyvsp[(3) - (6)].str); - n->behavior = (yyvsp[(6) - (6)].dbehavior); + n->relation = (yyvsp[-1].range); + n->property = (yyvsp[-3].str); + n->behavior = (yyvsp[0].dbehavior); n->removeType = OBJECT_RULE; n->missing_ok = false; (yyval.node) = (Node *) n; @@ -20189,9 +19966,9 @@ yyreduce: #line 5053 "gram.y" { DropPropertyStmt *n = makeNode(DropPropertyStmt); - n->relation = (yyvsp[(7) - (8)].range); - n->property = (yyvsp[(5) - (8)].str); - n->behavior = (yyvsp[(8) - (8)].dbehavior); + n->relation = (yyvsp[-1].range); + n->property = (yyvsp[-3].str); + n->behavior = (yyvsp[0].dbehavior); n->removeType = OBJECT_RULE; n->missing_ok = true; (yyval.node) = (Node *) n; @@ -20203,7 +19980,7 @@ yyreduce: { NotifyStmt *n = makeNode(NotifyStmt); n->relation = makeNode(RangeVar); - n->relation->relname = (yyvsp[(2) - (2)].str); + n->relation->relname = (yyvsp[0].str); n->relation->schemaname = NULL; (yyval.node) = (Node *)n; } @@ -20214,7 +19991,7 @@ yyreduce: { ListenStmt *n = makeNode(ListenStmt); n->relation = makeNode(RangeVar); - n->relation->relname = (yyvsp[(2) - (2)].str); + n->relation->relname = (yyvsp[0].str); n->relation->schemaname = NULL; (yyval.node) = (Node *)n; } @@ -20225,7 +20002,7 @@ yyreduce: { UnlistenStmt *n = makeNode(UnlistenStmt); n->relation = makeNode(RangeVar); - n->relation->relname = (yyvsp[(2) - (2)].str); + n->relation->relname = (yyvsp[0].str); n->relation->schemaname = NULL; (yyval.node) = (Node *)n; } @@ -20257,7 +20034,7 @@ yyreduce: { TransactionStmt *n = makeNode(TransactionStmt); n->kind = TRANS_STMT_BEGIN; - n->options = (yyvsp[(3) - (3)].list); + n->options = (yyvsp[0].list); (yyval.node) = (Node *)n; } break; @@ -20267,7 +20044,7 @@ yyreduce: { TransactionStmt *n = makeNode(TransactionStmt); n->kind = TRANS_STMT_START; - n->options = (yyvsp[(3) - (3)].list); + n->options = (yyvsp[0].list); (yyval.node) = (Node *)n; } break; @@ -20308,7 +20085,7 @@ yyreduce: TransactionStmt *n = makeNode(TransactionStmt); n->kind = TRANS_STMT_SAVEPOINT; n->options = list_make1(makeDefElem("savepoint_name", - (Node *)makeString((yyvsp[(2) - (2)].str)))); + (Node *)makeString((yyvsp[0].str)))); (yyval.node) = (Node *)n; } break; @@ -20319,7 +20096,7 @@ yyreduce: TransactionStmt *n = makeNode(TransactionStmt); n->kind = TRANS_STMT_RELEASE; n->options = list_make1(makeDefElem("savepoint_name", - (Node *)makeString((yyvsp[(3) - (3)].str)))); + (Node *)makeString((yyvsp[0].str)))); (yyval.node) = (Node *)n; } break; @@ -20330,7 +20107,7 @@ yyreduce: TransactionStmt *n = makeNode(TransactionStmt); n->kind = TRANS_STMT_RELEASE; n->options = list_make1(makeDefElem("savepoint_name", - (Node *)makeString((yyvsp[(2) - (2)].str)))); + (Node *)makeString((yyvsp[0].str)))); (yyval.node) = (Node *)n; } break; @@ -20341,7 +20118,7 @@ yyreduce: TransactionStmt *n = makeNode(TransactionStmt); n->kind = TRANS_STMT_ROLLBACK_TO; n->options = list_make1(makeDefElem("savepoint_name", - (Node *)makeString((yyvsp[(5) - (5)].str)))); + (Node *)makeString((yyvsp[0].str)))); (yyval.node) = (Node *)n; } break; @@ -20352,7 +20129,7 @@ yyreduce: TransactionStmt *n = makeNode(TransactionStmt); n->kind = TRANS_STMT_ROLLBACK_TO; n->options = list_make1(makeDefElem("savepoint_name", - (Node *)makeString((yyvsp[(4) - (4)].str)))); + (Node *)makeString((yyvsp[0].str)))); (yyval.node) = (Node *)n; } break; @@ -20362,7 +20139,7 @@ yyreduce: { TransactionStmt *n = makeNode(TransactionStmt); n->kind = TRANS_STMT_PREPARE; - n->gid = (yyvsp[(3) - (3)].str); + n->gid = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -20372,7 +20149,7 @@ yyreduce: { TransactionStmt *n = makeNode(TransactionStmt); n->kind = TRANS_STMT_COMMIT_PREPARED; - n->gid = (yyvsp[(3) - (3)].str); + n->gid = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -20382,7 +20159,7 @@ yyreduce: { TransactionStmt *n = makeNode(TransactionStmt); n->kind = TRANS_STMT_ROLLBACK_PREPARED; - n->gid = (yyvsp[(3) - (3)].str); + n->gid = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -20405,7 +20182,7 @@ yyreduce: case 812: #line 5235 "gram.y" { (yyval.defelt) = makeDefElem("transaction_isolation", - makeStringConst((yyvsp[(3) - (3)].str), NULL)); } + makeStringConst((yyvsp[0].str), NULL)); } break; case 813: @@ -20422,17 +20199,17 @@ yyreduce: case 815: #line 5248 "gram.y" - { (yyval.list) = list_make1((yyvsp[(1) - (1)].defelt)); } + { (yyval.list) = list_make1((yyvsp[0].defelt)); } break; case 816: #line 5250 "gram.y" - { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].defelt)); } + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].defelt)); } break; case 817: #line 5252 "gram.y" - { (yyval.list) = lappend((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].defelt)); } + { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].defelt)); } break; case 819: @@ -20444,10 +20221,10 @@ yyreduce: #line 5272 "gram.y" { ViewStmt *n = makeNode(ViewStmt); - n->view = (yyvsp[(4) - (8)].range); - n->view->istemp = (yyvsp[(2) - (8)].boolean); - n->aliases = (yyvsp[(5) - (8)].list); - n->query = (yyvsp[(7) - (8)].node); + n->view = (yyvsp[-4].range); + n->view->istemp = (yyvsp[-6].boolean); + n->aliases = (yyvsp[-3].list); + n->query = (yyvsp[-1].node); n->replace = false; (yyval.node) = (Node *) n; } @@ -20457,10 +20234,10 @@ yyreduce: #line 5283 "gram.y" { ViewStmt *n = makeNode(ViewStmt); - n->view = (yyvsp[(6) - (10)].range); - n->view->istemp = (yyvsp[(4) - (10)].boolean); - n->aliases = (yyvsp[(7) - (10)].list); - n->query = (yyvsp[(9) - (10)].node); + n->view = (yyvsp[-4].range); + n->view->istemp = (yyvsp[-6].boolean); + n->aliases = (yyvsp[-3].list); + n->query = (yyvsp[-1].node); n->replace = true; (yyval.node) = (Node *) n; } @@ -20502,7 +20279,7 @@ yyreduce: #line 5328 "gram.y" { LoadStmt *n = makeNode(LoadStmt); - n->filename = (yyvsp[(2) - (2)].str); + n->filename = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -20511,15 +20288,15 @@ yyreduce: #line 5344 "gram.y" { CreatedbStmt *n = makeNode(CreatedbStmt); - n->dbname = (yyvsp[(3) - (5)].str); - n->options = (yyvsp[(5) - (5)].list); + n->dbname = (yyvsp[-2].str); + n->options = (yyvsp[0].list); (yyval.node) = (Node *)n; } break; case 828: #line 5353 "gram.y" - { (yyval.list) = lappend((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].defelt)); } + { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].defelt)); } break; case 829: @@ -20530,7 +20307,7 @@ yyreduce: case 830: #line 5359 "gram.y" { - (yyval.defelt) = makeDefElem("tablespace", (Node *)makeString((yyvsp[(3) - (3)].str))); + (yyval.defelt) = makeDefElem("tablespace", (Node *)makeString((yyvsp[0].str))); } break; @@ -20544,7 +20321,7 @@ yyreduce: case 832: #line 5367 "gram.y" { - (yyval.defelt) = makeDefElem("location", (Node *)makeString((yyvsp[(3) - (3)].str))); + (yyval.defelt) = makeDefElem("location", (Node *)makeString((yyvsp[0].str))); } break; @@ -20558,7 +20335,7 @@ yyreduce: case 834: #line 5375 "gram.y" { - (yyval.defelt) = makeDefElem("template", (Node *)makeString((yyvsp[(3) - (3)].str))); + (yyval.defelt) = makeDefElem("template", (Node *)makeString((yyvsp[0].str))); } break; @@ -20572,14 +20349,14 @@ yyreduce: case 836: #line 5383 "gram.y" { - (yyval.defelt) = makeDefElem("encoding", (Node *)makeString((yyvsp[(3) - (3)].str))); + (yyval.defelt) = makeDefElem("encoding", (Node *)makeString((yyvsp[0].str))); } break; case 837: #line 5387 "gram.y" { - (yyval.defelt) = makeDefElem("encoding", (Node *)makeInteger((yyvsp[(3) - (3)].ival))); + (yyval.defelt) = makeDefElem("encoding", (Node *)makeInteger((yyvsp[0].ival))); } break; @@ -20593,14 +20370,14 @@ yyreduce: case 839: #line 5395 "gram.y" { - (yyval.defelt) = makeDefElem("connectionlimit", (Node *)makeInteger((yyvsp[(4) - (4)].ival))); + (yyval.defelt) = makeDefElem("connectionlimit", (Node *)makeInteger((yyvsp[0].ival))); } break; case 840: #line 5399 "gram.y" { - (yyval.defelt) = makeDefElem("owner", (Node *)makeString((yyvsp[(3) - (3)].str))); + (yyval.defelt) = makeDefElem("owner", (Node *)makeString((yyvsp[0].str))); } break; @@ -20625,8 +20402,8 @@ yyreduce: #line 5425 "gram.y" { AlterDatabaseStmt *n = makeNode(AlterDatabaseStmt); - n->dbname = (yyvsp[(3) - (5)].str); - n->options = (yyvsp[(5) - (5)].list); + n->dbname = (yyvsp[-2].str); + n->options = (yyvsp[0].list); (yyval.node) = (Node *)n; } break; @@ -20635,15 +20412,15 @@ yyreduce: #line 5435 "gram.y" { AlterDatabaseSetStmt *n = makeNode(AlterDatabaseSetStmt); - n->dbname = (yyvsp[(3) - (4)].str); - n->setstmt = (yyvsp[(4) - (4)].vsetstmt); + n->dbname = (yyvsp[-1].str); + n->setstmt = (yyvsp[0].vsetstmt); (yyval.node) = (Node *)n; } break; case 846: #line 5445 "gram.y" - { (yyval.list) = lappend((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].defelt)); } + { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].defelt)); } break; case 847: @@ -20654,7 +20431,7 @@ yyreduce: case 848: #line 5451 "gram.y" { - (yyval.defelt) = makeDefElem("connectionlimit", (Node *)makeInteger((yyvsp[(4) - (4)].ival))); + (yyval.defelt) = makeDefElem("connectionlimit", (Node *)makeInteger((yyvsp[0].ival))); } break; @@ -20662,7 +20439,7 @@ yyreduce: #line 5465 "gram.y" { DropdbStmt *n = makeNode(DropdbStmt); - n->dbname = (yyvsp[(3) - (3)].str); + n->dbname = (yyvsp[0].str); n->missing_ok = FALSE; (yyval.node) = (Node *)n; } @@ -20672,7 +20449,7 @@ yyreduce: #line 5472 "gram.y" { DropdbStmt *n = makeNode(DropdbStmt); - n->dbname = (yyvsp[(5) - (5)].str); + n->dbname = (yyvsp[0].str); n->missing_ok = TRUE; (yyval.node) = (Node *)n; } @@ -20682,9 +20459,9 @@ yyreduce: #line 5489 "gram.y" { CreateDomainStmt *n = makeNode(CreateDomainStmt); - n->domainname = (yyvsp[(3) - (6)].list); - n->typename = (yyvsp[(5) - (6)].typnam); - n->constraints = (yyvsp[(6) - (6)].list); + n->domainname = (yyvsp[-3].list); + n->typename = (yyvsp[-1].typnam); + n->constraints = (yyvsp[0].list); (yyval.node) = (Node *)n; } break; @@ -20694,8 +20471,8 @@ yyreduce: { AlterDomainStmt *n = makeNode(AlterDomainStmt); n->subtype = 'T'; - n->typename = (yyvsp[(3) - (4)].list); - n->def = (yyvsp[(4) - (4)].node); + n->typename = (yyvsp[-1].list); + n->def = (yyvsp[0].node); (yyval.node) = (Node *)n; } break; @@ -20705,7 +20482,7 @@ yyreduce: { AlterDomainStmt *n = makeNode(AlterDomainStmt); n->subtype = 'N'; - n->typename = (yyvsp[(3) - (6)].list); + n->typename = (yyvsp[-3].list); (yyval.node) = (Node *)n; } break; @@ -20715,7 +20492,7 @@ yyreduce: { AlterDomainStmt *n = makeNode(AlterDomainStmt); n->subtype = 'O'; - n->typename = (yyvsp[(3) - (6)].list); + n->typename = (yyvsp[-3].list); (yyval.node) = (Node *)n; } break; @@ -20725,8 +20502,8 @@ yyreduce: { AlterDomainStmt *n = makeNode(AlterDomainStmt); n->subtype = 'C'; - n->typename = (yyvsp[(3) - (5)].list); - n->def = (yyvsp[(5) - (5)].node); + n->typename = (yyvsp[-2].list); + n->def = (yyvsp[0].node); (yyval.node) = (Node *)n; } break; @@ -20736,9 +20513,9 @@ yyreduce: { AlterDomainStmt *n = makeNode(AlterDomainStmt); n->subtype = 'X'; - n->typename = (yyvsp[(3) - (7)].list); - n->name = (yyvsp[(6) - (7)].str); - n->behavior = (yyvsp[(7) - (7)].dbehavior); + n->typename = (yyvsp[-4].list); + n->name = (yyvsp[-1].str); + n->behavior = (yyvsp[0].dbehavior); (yyval.node) = (Node *)n; } break; @@ -20757,8 +20534,8 @@ yyreduce: #line 5558 "gram.y" { AlterTSDictionaryStmt *n = makeNode(AlterTSDictionaryStmt); - n->dictname = (yyvsp[(5) - (6)].list); - n->options = (yyvsp[(6) - (6)].list); + n->dictname = (yyvsp[-1].list); + n->options = (yyvsp[0].list); (yyval.node) = (Node *)n; } break; @@ -20767,9 +20544,9 @@ yyreduce: #line 5568 "gram.y" { AlterTSConfigurationStmt *n = makeNode(AlterTSConfigurationStmt); - n->cfgname = (yyvsp[(5) - (11)].list); - n->tokentype = (yyvsp[(9) - (11)].list); - n->dicts = (yyvsp[(11) - (11)].list); + n->cfgname = (yyvsp[-6].list); + n->tokentype = (yyvsp[-2].list); + n->dicts = (yyvsp[0].list); n->override = false; n->replace = false; (yyval.node) = (Node*)n; @@ -20780,9 +20557,9 @@ yyreduce: #line 5578 "gram.y" { AlterTSConfigurationStmt *n = makeNode(AlterTSConfigurationStmt); - n->cfgname = (yyvsp[(5) - (11)].list); - n->tokentype = (yyvsp[(9) - (11)].list); - n->dicts = (yyvsp[(11) - (11)].list); + n->cfgname = (yyvsp[-6].list); + n->tokentype = (yyvsp[-2].list); + n->dicts = (yyvsp[0].list); n->override = true; n->replace = false; (yyval.node) = (Node*)n; @@ -20793,9 +20570,9 @@ yyreduce: #line 5588 "gram.y" { AlterTSConfigurationStmt *n = makeNode(AlterTSConfigurationStmt); - n->cfgname = (yyvsp[(5) - (11)].list); + n->cfgname = (yyvsp[-6].list); n->tokentype = NIL; - n->dicts = list_make2((yyvsp[(9) - (11)].list),(yyvsp[(11) - (11)].list)); + n->dicts = list_make2((yyvsp[-2].list),(yyvsp[0].list)); n->override = false; n->replace = true; (yyval.node) = (Node*)n; @@ -20806,9 +20583,9 @@ yyreduce: #line 5598 "gram.y" { AlterTSConfigurationStmt *n = makeNode(AlterTSConfigurationStmt); - n->cfgname = (yyvsp[(5) - (13)].list); - n->tokentype = (yyvsp[(9) - (13)].list); - n->dicts = list_make2((yyvsp[(11) - (13)].list),(yyvsp[(13) - (13)].list)); + n->cfgname = (yyvsp[-8].list); + n->tokentype = (yyvsp[-4].list); + n->dicts = list_make2((yyvsp[-2].list),(yyvsp[0].list)); n->override = false; n->replace = true; (yyval.node) = (Node*)n; @@ -20819,8 +20596,8 @@ yyreduce: #line 5608 "gram.y" { AlterTSConfigurationStmt *n = makeNode(AlterTSConfigurationStmt); - n->cfgname = (yyvsp[(5) - (9)].list); - n->tokentype = (yyvsp[(9) - (9)].list); + n->cfgname = (yyvsp[-4].list); + n->tokentype = (yyvsp[0].list); n->missing_ok = false; (yyval.node) = (Node*)n; } @@ -20830,8 +20607,8 @@ yyreduce: #line 5616 "gram.y" { AlterTSConfigurationStmt *n = makeNode(AlterTSConfigurationStmt); - n->cfgname = (yyvsp[(5) - (11)].list); - n->tokentype = (yyvsp[(11) - (11)].list); + n->cfgname = (yyvsp[-6].list); + n->tokentype = (yyvsp[0].list); n->missing_ok = true; (yyval.node) = (Node*)n; } @@ -20841,11 +20618,11 @@ yyreduce: #line 5638 "gram.y" { CreateConversionStmt *n = makeNode(CreateConversionStmt); - n->conversion_name = (yyvsp[(4) - (10)].list); - n->for_encoding_name = (yyvsp[(6) - (10)].str); - n->to_encoding_name = (yyvsp[(8) - (10)].str); - n->func_name = (yyvsp[(10) - (10)].list); - n->def = (yyvsp[(2) - (10)].boolean); + n->conversion_name = (yyvsp[-6].list); + n->for_encoding_name = (yyvsp[-4].str); + n->to_encoding_name = (yyvsp[-2].str); + n->func_name = (yyvsp[0].list); + n->def = (yyvsp[-8].boolean); (yyval.node) = (Node *)n; } break; @@ -20854,8 +20631,8 @@ yyreduce: #line 5660 "gram.y" { ClusterStmt *n = makeNode(ClusterStmt); - n->relation = (yyvsp[(2) - (3)].range); - n->indexname = (yyvsp[(3) - (3)].str); + n->relation = (yyvsp[-1].range); + n->indexname = (yyvsp[0].str); (yyval.node) = (Node*)n; } break; @@ -20874,15 +20651,15 @@ yyreduce: #line 5675 "gram.y" { ClusterStmt *n = makeNode(ClusterStmt); - n->relation = (yyvsp[(4) - (4)].range); - n->indexname = (yyvsp[(2) - (4)].str); + n->relation = (yyvsp[0].range); + n->indexname = (yyvsp[-2].str); (yyval.node) = (Node*)n; } break; case 870: #line 5684 "gram.y" - { (yyval.str) = (yyvsp[(2) - (2)].str); } + { (yyval.str) = (yyvsp[0].str); } break; case 871: @@ -20896,9 +20673,9 @@ yyreduce: VacuumStmt *n = makeNode(VacuumStmt); n->vacuum = true; n->analyze = false; - n->full = (yyvsp[(2) - (4)].boolean); - n->freeze_min_age = (yyvsp[(3) - (4)].boolean) ? 0 : -1; - n->verbose = (yyvsp[(4) - (4)].boolean); + n->full = (yyvsp[-2].boolean); + n->freeze_min_age = (yyvsp[-1].boolean) ? 0 : -1; + n->verbose = (yyvsp[0].boolean); n->relation = NULL; n->va_cols = NIL; (yyval.node) = (Node *)n; @@ -20911,10 +20688,10 @@ yyreduce: VacuumStmt *n = makeNode(VacuumStmt); n->vacuum = true; n->analyze = false; - n->full = (yyvsp[(2) - (5)].boolean); - n->freeze_min_age = (yyvsp[(3) - (5)].boolean) ? 0 : -1; - n->verbose = (yyvsp[(4) - (5)].boolean); - n->relation = (yyvsp[(5) - (5)].range); + n->full = (yyvsp[-3].boolean); + n->freeze_min_age = (yyvsp[-2].boolean) ? 0 : -1; + n->verbose = (yyvsp[-1].boolean); + n->relation = (yyvsp[0].range); n->va_cols = NIL; (yyval.node) = (Node *)n; } @@ -20923,11 +20700,11 @@ yyreduce: case 874: #line 5722 "gram.y" { - VacuumStmt *n = (VacuumStmt *) (yyvsp[(5) - (5)].node); + VacuumStmt *n = (VacuumStmt *) (yyvsp[0].node); n->vacuum = true; - n->full = (yyvsp[(2) - (5)].boolean); - n->freeze_min_age = (yyvsp[(3) - (5)].boolean) ? 0 : -1; - n->verbose |= (yyvsp[(4) - (5)].boolean); + n->full = (yyvsp[-3].boolean); + n->freeze_min_age = (yyvsp[-2].boolean) ? 0 : -1; + n->verbose |= (yyvsp[-1].boolean); (yyval.node) = (Node *)n; } break; @@ -20940,7 +20717,7 @@ yyreduce: n->analyze = true; n->full = false; n->freeze_min_age = -1; - n->verbose = (yyvsp[(2) - (2)].boolean); + n->verbose = (yyvsp[0].boolean); n->relation = NULL; n->va_cols = NIL; (yyval.node) = (Node *)n; @@ -20955,9 +20732,9 @@ yyreduce: n->analyze = true; n->full = false; n->freeze_min_age = -1; - n->verbose = (yyvsp[(2) - (4)].boolean); - n->relation = (yyvsp[(3) - (4)].range); - n->va_cols = (yyvsp[(4) - (4)].list); + n->verbose = (yyvsp[-2].boolean); + n->relation = (yyvsp[-1].range); + n->va_cols = (yyvsp[0].list); (yyval.node) = (Node *)n; } break; @@ -21004,7 +20781,7 @@ yyreduce: case 885: #line 5778 "gram.y" - { (yyval.list) = (yyvsp[(2) - (3)].list); } + { (yyval.list) = (yyvsp[-1].list); } break; case 886: @@ -21016,9 +20793,9 @@ yyreduce: #line 5791 "gram.y" { ExplainStmt *n = makeNode(ExplainStmt); - n->analyze = (yyvsp[(2) - (4)].boolean); - n->verbose = (yyvsp[(3) - (4)].boolean); - n->query = (yyvsp[(4) - (4)].node); + n->analyze = (yyvsp[-2].boolean); + n->verbose = (yyvsp[-1].boolean); + n->query = (yyvsp[0].node); (yyval.node) = (Node *)n; } break; @@ -21037,16 +20814,16 @@ yyreduce: #line 5822 "gram.y" { PrepareStmt *n = makeNode(PrepareStmt); - n->name = (yyvsp[(2) - (5)].str); - n->argtypes = (yyvsp[(3) - (5)].list); - n->query = (yyvsp[(5) - (5)].node); + n->name = (yyvsp[-3].str); + n->argtypes = (yyvsp[-2].list); + n->query = (yyvsp[0].node); (yyval.node) = (Node *) n; } break; case 897: #line 5831 "gram.y" - { (yyval.list) = (yyvsp[(2) - (3)].list); } + { (yyval.list) = (yyvsp[-1].list); } break; case 898: @@ -21058,8 +20835,8 @@ yyreduce: #line 5850 "gram.y" { ExecuteStmt *n = makeNode(ExecuteStmt); - n->name = (yyvsp[(2) - (3)].str); - n->params = (yyvsp[(3) - (3)].list); + n->name = (yyvsp[-1].str); + n->params = (yyvsp[0].list); n->into = NULL; (yyval.node) = (Node *) n; } @@ -21069,11 +20846,11 @@ yyreduce: #line 5859 "gram.y" { ExecuteStmt *n = makeNode(ExecuteStmt); - n->name = (yyvsp[(7) - (8)].str); - n->params = (yyvsp[(8) - (8)].list); - (yyvsp[(4) - (8)].into)->rel->istemp = (yyvsp[(2) - (8)].boolean); - n->into = (yyvsp[(4) - (8)].into); - if ((yyvsp[(4) - (8)].into)->colNames) + n->name = (yyvsp[-1].str); + n->params = (yyvsp[0].list); + (yyvsp[-4].into)->rel->istemp = (yyvsp[-6].boolean); + n->into = (yyvsp[-4].into); + if ((yyvsp[-4].into)->colNames) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("column name list not allowed in CREATE TABLE / AS EXECUTE"))); @@ -21084,7 +20861,7 @@ yyreduce: case 905: #line 5874 "gram.y" - { (yyval.list) = (yyvsp[(2) - (3)].list); } + { (yyval.list) = (yyvsp[-1].list); } break; case 906: @@ -21096,7 +20873,7 @@ yyreduce: #line 5886 "gram.y" { DeallocateStmt *n = makeNode(DeallocateStmt); - n->name = (yyvsp[(2) - (2)].str); + n->name = (yyvsp[0].str); (yyval.node) = (Node *) n; } break; @@ -21105,7 +20882,7 @@ yyreduce: #line 5892 "gram.y" { DeallocateStmt *n = makeNode(DeallocateStmt); - n->name = (yyvsp[(3) - (3)].str); + n->name = (yyvsp[0].str); (yyval.node) = (Node *) n; } break; @@ -21131,9 +20908,9 @@ yyreduce: case 911: #line 5920 "gram.y" { - (yyvsp[(4) - (5)].istmt)->relation = (yyvsp[(3) - (5)].range); - (yyvsp[(4) - (5)].istmt)->returningList = (yyvsp[(5) - (5)].list); - (yyval.node) = (Node *) (yyvsp[(4) - (5)].istmt); + (yyvsp[-1].istmt)->relation = (yyvsp[-2].range); + (yyvsp[-1].istmt)->returningList = (yyvsp[0].list); + (yyval.node) = (Node *) (yyvsp[-1].istmt); } break; @@ -21142,7 +20919,7 @@ yyreduce: { (yyval.istmt) = makeNode(InsertStmt); (yyval.istmt)->cols = NIL; - (yyval.istmt)->selectStmt = (yyvsp[(1) - (1)].node); + (yyval.istmt)->selectStmt = (yyvsp[0].node); } break; @@ -21150,8 +20927,8 @@ yyreduce: #line 5935 "gram.y" { (yyval.istmt) = makeNode(InsertStmt); - (yyval.istmt)->cols = (yyvsp[(2) - (4)].list); - (yyval.istmt)->selectStmt = (yyvsp[(4) - (4)].node); + (yyval.istmt)->cols = (yyvsp[-2].list); + (yyval.istmt)->selectStmt = (yyvsp[0].node); } break; @@ -21166,28 +20943,28 @@ yyreduce: case 915: #line 5950 "gram.y" - { (yyval.list) = list_make1((yyvsp[(1) - (1)].target)); } + { (yyval.list) = list_make1((yyvsp[0].target)); } break; case 916: #line 5952 "gram.y" - { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].target)); } + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].target)); } break; case 917: #line 5957 "gram.y" { (yyval.target) = makeNode(ResTarget); - (yyval.target)->name = (yyvsp[(1) - (2)].str); - (yyval.target)->indirection = (yyvsp[(2) - (2)].list); + (yyval.target)->name = (yyvsp[-1].str); + (yyval.target)->indirection = (yyvsp[0].list); (yyval.target)->val = NULL; - (yyval.target)->location = (yylsp[(1) - (2)]); + (yyval.target)->location = (yylsp[-1]); } break; case 918: #line 5967 "gram.y" - { (yyval.list) = (yyvsp[(2) - (2)].list); } + { (yyval.list) = (yyvsp[0].list); } break; case 919: @@ -21199,17 +20976,17 @@ yyreduce: #line 5981 "gram.y" { DeleteStmt *n = makeNode(DeleteStmt); - n->relation = (yyvsp[(3) - (6)].range); - n->usingClause = (yyvsp[(4) - (6)].list); - n->whereClause = (yyvsp[(5) - (6)].node); - n->returningList = (yyvsp[(6) - (6)].list); + n->relation = (yyvsp[-3].range); + n->usingClause = (yyvsp[-2].list); + n->whereClause = (yyvsp[-1].node); + n->returningList = (yyvsp[0].list); (yyval.node) = (Node *)n; } break; case 921: #line 5992 "gram.y" - { (yyval.list) = (yyvsp[(2) - (2)].list); } + { (yyval.list) = (yyvsp[0].list); } break; case 922: @@ -21222,16 +20999,16 @@ yyreduce: { LockStmt *n = makeNode(LockStmt); - n->relations = (yyvsp[(3) - (5)].list); - n->mode = (yyvsp[(4) - (5)].ival); - n->nowait = (yyvsp[(5) - (5)].boolean); + n->relations = (yyvsp[-2].list); + n->mode = (yyvsp[-1].ival); + n->nowait = (yyvsp[0].boolean); (yyval.node) = (Node *)n; } break; case 924: #line 6007 "gram.y" - { (yyval.ival) = (yyvsp[(2) - (3)].ival); } + { (yyval.ival) = (yyvsp[-1].ival); } break; case 925: @@ -21293,40 +21070,40 @@ yyreduce: #line 6038 "gram.y" { UpdateStmt *n = makeNode(UpdateStmt); - n->relation = (yyvsp[(2) - (7)].range); - n->targetList = (yyvsp[(4) - (7)].list); - n->fromClause = (yyvsp[(5) - (7)].list); - n->whereClause = (yyvsp[(6) - (7)].node); - n->returningList = (yyvsp[(7) - (7)].list); + n->relation = (yyvsp[-5].range); + n->targetList = (yyvsp[-3].list); + n->fromClause = (yyvsp[-2].list); + n->whereClause = (yyvsp[-1].node); + n->returningList = (yyvsp[0].list); (yyval.node) = (Node *)n; } break; case 937: #line 6050 "gram.y" - { (yyval.list) = (yyvsp[(1) - (1)].list); } + { (yyval.list) = (yyvsp[0].list); } break; case 938: #line 6051 "gram.y" - { (yyval.list) = list_concat((yyvsp[(1) - (3)].list),(yyvsp[(3) - (3)].list)); } + { (yyval.list) = list_concat((yyvsp[-2].list),(yyvsp[0].list)); } break; case 939: #line 6055 "gram.y" - { (yyval.list) = list_make1((yyvsp[(1) - (1)].target)); } + { (yyval.list) = list_make1((yyvsp[0].target)); } break; case 940: #line 6056 "gram.y" - { (yyval.list) = (yyvsp[(1) - (1)].list); } + { (yyval.list) = (yyvsp[0].list); } break; case 941: #line 6061 "gram.y" { - (yyval.target) = (yyvsp[(1) - (3)].target); - (yyval.target)->val = (Node *) (yyvsp[(3) - (3)].node); + (yyval.target) = (yyvsp[-2].target); + (yyval.target)->val = (Node *) (yyvsp[0].node); } break; @@ -21341,11 +21118,11 @@ yyreduce: * into the destination ResTargets. XXX this approach * cannot work for general row expressions as sources. */ - if (list_length((yyvsp[(2) - (5)].list)) != list_length((yyvsp[(5) - (5)].list))) + if (list_length((yyvsp[-3].list)) != list_length((yyvsp[0].list))) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), errmsg("number of columns does not match number of values"))); - forboth(col_cell, (yyvsp[(2) - (5)].list), val_cell, (yyvsp[(5) - (5)].list)) + forboth(col_cell, (yyvsp[-3].list), val_cell, (yyvsp[0].list)) { ResTarget *res_col = (ResTarget *) lfirst(col_cell); Node *res_val = (Node *) lfirst(val_cell); @@ -21353,7 +21130,7 @@ yyreduce: res_col->val = res_val; } - (yyval.list) = (yyvsp[(2) - (5)].list); + (yyval.list) = (yyvsp[-3].list); } break; @@ -21361,31 +21138,31 @@ yyreduce: #line 6096 "gram.y" { (yyval.target) = makeNode(ResTarget); - (yyval.target)->name = (yyvsp[(1) - (2)].str); - (yyval.target)->indirection = (yyvsp[(2) - (2)].list); + (yyval.target)->name = (yyvsp[-1].str); + (yyval.target)->indirection = (yyvsp[0].list); (yyval.target)->val = NULL; /* upper production sets this */ - (yyval.target)->location = (yylsp[(1) - (2)]); + (yyval.target)->location = (yylsp[-1]); } break; case 944: #line 6106 "gram.y" - { (yyval.list) = list_make1((yyvsp[(1) - (1)].target)); } + { (yyval.list) = list_make1((yyvsp[0].target)); } break; case 945: #line 6107 "gram.y" - { (yyval.list) = lappend((yyvsp[(1) - (3)].list),(yyvsp[(3) - (3)].target)); } + { (yyval.list) = lappend((yyvsp[-2].list),(yyvsp[0].target)); } break; case 946: #line 6118 "gram.y" { DeclareCursorStmt *n = makeNode(DeclareCursorStmt); - n->portalname = (yyvsp[(2) - (7)].str); + n->portalname = (yyvsp[-5].str); /* currently we always set FAST_PLAN option */ - n->options = (yyvsp[(3) - (7)].ival) | (yyvsp[(5) - (7)].ival) | CURSOR_OPT_FAST_PLAN; - n->query = (yyvsp[(7) - (7)].node); + n->options = (yyvsp[-4].ival) | (yyvsp[-2].ival) | CURSOR_OPT_FAST_PLAN; + n->query = (yyvsp[0].node); (yyval.node) = (Node *)n; } break; @@ -21397,22 +21174,22 @@ yyreduce: case 948: #line 6129 "gram.y" - { (yyval.ival) = (yyvsp[(1) - (3)].ival) | CURSOR_OPT_NO_SCROLL; } + { (yyval.ival) = (yyvsp[-2].ival) | CURSOR_OPT_NO_SCROLL; } break; case 949: #line 6130 "gram.y" - { (yyval.ival) = (yyvsp[(1) - (2)].ival) | CURSOR_OPT_SCROLL; } + { (yyval.ival) = (yyvsp[-1].ival) | CURSOR_OPT_SCROLL; } break; case 950: #line 6131 "gram.y" - { (yyval.ival) = (yyvsp[(1) - (2)].ival) | CURSOR_OPT_BINARY; } + { (yyval.ival) = (yyvsp[-1].ival) | CURSOR_OPT_BINARY; } break; case 951: #line 6132 "gram.y" - { (yyval.ival) = (yyvsp[(1) - (2)].ival) | CURSOR_OPT_INSENSITIVE; } + { (yyval.ival) = (yyvsp[-1].ival) | CURSOR_OPT_INSENSITIVE; } break; case 952: @@ -21432,94 +21209,94 @@ yyreduce: case 957: #line 6190 "gram.y" - { (yyval.node) = (yyvsp[(2) - (3)].node); } + { (yyval.node) = (yyvsp[-1].node); } break; case 958: #line 6191 "gram.y" - { (yyval.node) = (yyvsp[(2) - (3)].node); } + { (yyval.node) = (yyvsp[-1].node); } break; case 959: #line 6201 "gram.y" - { (yyval.node) = (yyvsp[(1) - (1)].node); } + { (yyval.node) = (yyvsp[0].node); } break; case 960: #line 6203 "gram.y" { - insertSelectOptions((SelectStmt *) (yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].list), NIL, + insertSelectOptions((SelectStmt *) (yyvsp[-1].node), (yyvsp[0].list), NIL, NULL, NULL); - (yyval.node) = (yyvsp[(1) - (2)].node); + (yyval.node) = (yyvsp[-1].node); } break; case 961: #line 6209 "gram.y" { - insertSelectOptions((SelectStmt *) (yyvsp[(1) - (4)].node), (yyvsp[(2) - (4)].list), (yyvsp[(3) - (4)].list), - list_nth((yyvsp[(4) - (4)].list), 0), list_nth((yyvsp[(4) - (4)].list), 1)); - (yyval.node) = (yyvsp[(1) - (4)].node); + insertSelectOptions((SelectStmt *) (yyvsp[-3].node), (yyvsp[-2].list), (yyvsp[-1].list), + list_nth((yyvsp[0].list), 0), list_nth((yyvsp[0].list), 1)); + (yyval.node) = (yyvsp[-3].node); } break; case 962: #line 6215 "gram.y" { - insertSelectOptions((SelectStmt *) (yyvsp[(1) - (4)].node), (yyvsp[(2) - (4)].list), (yyvsp[(4) - (4)].list), - list_nth((yyvsp[(3) - (4)].list), 0), list_nth((yyvsp[(3) - (4)].list), 1)); - (yyval.node) = (yyvsp[(1) - (4)].node); + insertSelectOptions((SelectStmt *) (yyvsp[-3].node), (yyvsp[-2].list), (yyvsp[0].list), + list_nth((yyvsp[-1].list), 0), list_nth((yyvsp[-1].list), 1)); + (yyval.node) = (yyvsp[-3].node); } break; case 963: #line 6223 "gram.y" - { (yyval.node) = (yyvsp[(1) - (1)].node); } + { (yyval.node) = (yyvsp[0].node); } break; case 964: #line 6224 "gram.y" - { (yyval.node) = (yyvsp[(1) - (1)].node); } + { (yyval.node) = (yyvsp[0].node); } break; case 965: #line 6254 "gram.y" { SelectStmt *n = makeNode(SelectStmt); - n->distinctClause = (yyvsp[(2) - (8)].list); - n->targetList = (yyvsp[(3) - (8)].list); - n->intoClause = (yyvsp[(4) - (8)].into); - n->fromClause = (yyvsp[(5) - (8)].list); - n->whereClause = (yyvsp[(6) - (8)].node); - n->groupClause = (yyvsp[(7) - (8)].list); - n->havingClause = (yyvsp[(8) - (8)].node); + n->distinctClause = (yyvsp[-6].list); + n->targetList = (yyvsp[-5].list); + n->intoClause = (yyvsp[-4].into); + n->fromClause = (yyvsp[-3].list); + n->whereClause = (yyvsp[-2].node); + n->groupClause = (yyvsp[-1].list); + n->havingClause = (yyvsp[0].node); (yyval.node) = (Node *)n; } break; case 966: #line 6265 "gram.y" - { (yyval.node) = (yyvsp[(1) - (1)].node); } + { (yyval.node) = (yyvsp[0].node); } break; case 967: #line 6267 "gram.y" { - (yyval.node) = makeSetOp(SETOP_UNION, (yyvsp[(3) - (4)].boolean), (yyvsp[(1) - (4)].node), (yyvsp[(4) - (4)].node)); + (yyval.node) = makeSetOp(SETOP_UNION, (yyvsp[-1].boolean), (yyvsp[-3].node), (yyvsp[0].node)); } break; case 968: #line 6271 "gram.y" { - (yyval.node) = makeSetOp(SETOP_INTERSECT, (yyvsp[(3) - (4)].boolean), (yyvsp[(1) - (4)].node), (yyvsp[(4) - (4)].node)); + (yyval.node) = makeSetOp(SETOP_INTERSECT, (yyvsp[-1].boolean), (yyvsp[-3].node), (yyvsp[0].node)); } break; case 969: #line 6275 "gram.y" { - (yyval.node) = makeSetOp(SETOP_EXCEPT, (yyvsp[(3) - (4)].boolean), (yyvsp[(1) - (4)].node), (yyvsp[(4) - (4)].node)); + (yyval.node) = makeSetOp(SETOP_EXCEPT, (yyvsp[-1].boolean), (yyvsp[-3].node), (yyvsp[0].node)); } break; @@ -21527,7 +21304,7 @@ yyreduce: #line 6282 "gram.y" { (yyval.into) = makeNode(IntoClause); - (yyval.into)->rel = (yyvsp[(2) - (2)].range); + (yyval.into)->rel = (yyvsp[0].range); (yyval.into)->colNames = NIL; (yyval.into)->options = NIL; (yyval.into)->onCommit = ONCOMMIT_NOOP; @@ -21543,7 +21320,7 @@ yyreduce: case 972: #line 6300 "gram.y" { - (yyval.range) = (yyvsp[(3) - (3)].range); + (yyval.range) = (yyvsp[0].range); (yyval.range)->istemp = true; } break; @@ -21551,7 +21328,7 @@ yyreduce: case 973: #line 6305 "gram.y" { - (yyval.range) = (yyvsp[(3) - (3)].range); + (yyval.range) = (yyvsp[0].range); (yyval.range)->istemp = true; } break; @@ -21559,7 +21336,7 @@ yyreduce: case 974: #line 6310 "gram.y" { - (yyval.range) = (yyvsp[(4) - (4)].range); + (yyval.range) = (yyvsp[0].range); (yyval.range)->istemp = true; } break; @@ -21567,7 +21344,7 @@ yyreduce: case 975: #line 6315 "gram.y" { - (yyval.range) = (yyvsp[(4) - (4)].range); + (yyval.range) = (yyvsp[0].range); (yyval.range)->istemp = true; } break; @@ -21575,7 +21352,7 @@ yyreduce: case 976: #line 6320 "gram.y" { - (yyval.range) = (yyvsp[(4) - (4)].range); + (yyval.range) = (yyvsp[0].range); (yyval.range)->istemp = true; } break; @@ -21583,7 +21360,7 @@ yyreduce: case 977: #line 6325 "gram.y" { - (yyval.range) = (yyvsp[(4) - (4)].range); + (yyval.range) = (yyvsp[0].range); (yyval.range)->istemp = true; } break; @@ -21591,7 +21368,7 @@ yyreduce: case 978: #line 6330 "gram.y" { - (yyval.range) = (yyvsp[(2) - (2)].range); + (yyval.range) = (yyvsp[0].range); (yyval.range)->istemp = false; } break; @@ -21599,7 +21376,7 @@ yyreduce: case 979: #line 6335 "gram.y" { - (yyval.range) = (yyvsp[(1) - (1)].range); + (yyval.range) = (yyvsp[0].range); (yyval.range)->istemp = false; } break; @@ -21636,7 +21413,7 @@ yyreduce: case 986: #line 6355 "gram.y" - { (yyval.list) = (yyvsp[(4) - (5)].list); } + { (yyval.list) = (yyvsp[-1].list); } break; case 987: @@ -21651,7 +21428,7 @@ yyreduce: case 989: #line 6361 "gram.y" - { (yyval.list) = (yyvsp[(1) - (1)].list);} + { (yyval.list) = (yyvsp[0].list);} break; case 990: @@ -21661,27 +21438,27 @@ yyreduce: case 991: #line 6366 "gram.y" - { (yyval.list) = (yyvsp[(3) - (3)].list); } + { (yyval.list) = (yyvsp[0].list); } break; case 992: #line 6370 "gram.y" - { (yyval.list) = list_make1((yyvsp[(1) - (1)].sortby)); } + { (yyval.list) = list_make1((yyvsp[0].sortby)); } break; case 993: #line 6371 "gram.y" - { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].sortby)); } + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].sortby)); } break; case 994: #line 6375 "gram.y" { (yyval.sortby) = makeNode(SortBy); - (yyval.sortby)->node = (yyvsp[(1) - (4)].node); + (yyval.sortby)->node = (yyvsp[-3].node); (yyval.sortby)->sortby_dir = SORTBY_USING; - (yyval.sortby)->sortby_nulls = (yyvsp[(4) - (4)].ival); - (yyval.sortby)->useOp = (yyvsp[(3) - (4)].list); + (yyval.sortby)->sortby_nulls = (yyvsp[0].ival); + (yyval.sortby)->useOp = (yyvsp[-1].list); } break; @@ -21689,31 +21466,31 @@ yyreduce: #line 6383 "gram.y" { (yyval.sortby) = makeNode(SortBy); - (yyval.sortby)->node = (yyvsp[(1) - (3)].node); - (yyval.sortby)->sortby_dir = (yyvsp[(2) - (3)].ival); - (yyval.sortby)->sortby_nulls = (yyvsp[(3) - (3)].ival); + (yyval.sortby)->node = (yyvsp[-2].node); + (yyval.sortby)->sortby_dir = (yyvsp[-1].ival); + (yyval.sortby)->sortby_nulls = (yyvsp[0].ival); (yyval.sortby)->useOp = NIL; } break; case 996: #line 6395 "gram.y" - { (yyval.list) = list_make2((yyvsp[(4) - (4)].node), (yyvsp[(2) - (4)].node)); } + { (yyval.list) = list_make2((yyvsp[0].node), (yyvsp[-2].node)); } break; case 997: #line 6397 "gram.y" - { (yyval.list) = list_make2((yyvsp[(2) - (4)].node), (yyvsp[(4) - (4)].node)); } + { (yyval.list) = list_make2((yyvsp[-2].node), (yyvsp[0].node)); } break; case 998: #line 6399 "gram.y" - { (yyval.list) = list_make2(NULL, (yyvsp[(2) - (2)].node)); } + { (yyval.list) = list_make2(NULL, (yyvsp[0].node)); } break; case 999: #line 6401 "gram.y" - { (yyval.list) = list_make2((yyvsp[(2) - (2)].node), NULL); } + { (yyval.list) = list_make2((yyvsp[0].node), NULL); } break; case 1000: @@ -21729,7 +21506,7 @@ yyreduce: case 1001: #line 6413 "gram.y" - { (yyval.list) = (yyvsp[(1) - (1)].list); } + { (yyval.list) = (yyvsp[0].list); } break; case 1002: @@ -21739,7 +21516,7 @@ yyreduce: case 1003: #line 6419 "gram.y" - { (yyval.node) = (yyvsp[(1) - (1)].node); } + { (yyval.node) = (yyvsp[0].node); } break; case 1004: @@ -21754,12 +21531,12 @@ yyreduce: case 1005: #line 6430 "gram.y" - { (yyval.node) = (yyvsp[(1) - (1)].node); } + { (yyval.node) = (yyvsp[0].node); } break; case 1006: #line 6434 "gram.y" - { (yyval.list) = (yyvsp[(3) - (3)].list); } + { (yyval.list) = (yyvsp[0].list); } break; case 1007: @@ -21769,7 +21546,7 @@ yyreduce: case 1008: #line 6439 "gram.y" - { (yyval.node) = (yyvsp[(2) - (2)].node); } + { (yyval.node) = (yyvsp[0].node); } break; case 1009: @@ -21779,7 +21556,7 @@ yyreduce: case 1010: #line 6444 "gram.y" - { (yyval.list) = (yyvsp[(1) - (1)].list); } + { (yyval.list) = (yyvsp[0].list); } break; case 1011: @@ -21789,7 +21566,7 @@ yyreduce: case 1012: #line 6449 "gram.y" - { (yyval.list) = (yyvsp[(1) - (1)].list); } + { (yyval.list) = (yyvsp[0].list); } break; case 1013: @@ -21799,21 +21576,21 @@ yyreduce: case 1014: #line 6454 "gram.y" - { (yyval.list) = list_make1((yyvsp[(1) - (1)].node)); } + { (yyval.list) = list_make1((yyvsp[0].node)); } break; case 1015: #line 6455 "gram.y" - { (yyval.list) = lappend((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].node)); } + { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].node)); } break; case 1016: #line 6460 "gram.y" { LockingClause *n = makeNode(LockingClause); - n->lockedRels = (yyvsp[(3) - (4)].list); + n->lockedRels = (yyvsp[-1].list); n->forUpdate = TRUE; - n->noWait = (yyvsp[(4) - (4)].boolean); + n->noWait = (yyvsp[0].boolean); (yyval.node) = (Node *) n; } break; @@ -21822,16 +21599,16 @@ yyreduce: #line 6468 "gram.y" { LockingClause *n = makeNode(LockingClause); - n->lockedRels = (yyvsp[(3) - (4)].list); + n->lockedRels = (yyvsp[-1].list); n->forUpdate = FALSE; - n->noWait = (yyvsp[(4) - (4)].boolean); + n->noWait = (yyvsp[0].boolean); (yyval.node) = (Node *) n; } break; case 1018: #line 6478 "gram.y" - { (yyval.list) = (yyvsp[(2) - (2)].list); } + { (yyval.list) = (yyvsp[0].list); } break; case 1019: @@ -21843,7 +21620,7 @@ yyreduce: #line 6485 "gram.y" { SelectStmt *n = makeNode(SelectStmt); - n->valuesLists = list_make1((yyvsp[(2) - (2)].list)); + n->valuesLists = list_make1((yyvsp[0].list)); (yyval.node) = (Node *) n; } break; @@ -21851,15 +21628,15 @@ yyreduce: case 1021: #line 6491 "gram.y" { - SelectStmt *n = (SelectStmt *) (yyvsp[(1) - (3)].node); - n->valuesLists = lappend(n->valuesLists, (yyvsp[(3) - (3)].list)); + SelectStmt *n = (SelectStmt *) (yyvsp[-2].node); + n->valuesLists = lappend(n->valuesLists, (yyvsp[0].list)); (yyval.node) = (Node *) n; } break; case 1022: #line 6508 "gram.y" - { (yyval.list) = (yyvsp[(2) - (2)].list); } + { (yyval.list) = (yyvsp[0].list); } break; case 1023: @@ -21869,26 +21646,26 @@ yyreduce: case 1024: #line 6513 "gram.y" - { (yyval.list) = list_make1((yyvsp[(1) - (1)].node)); } + { (yyval.list) = list_make1((yyvsp[0].node)); } break; case 1025: #line 6514 "gram.y" - { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); } + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].node)); } break; case 1026: #line 6525 "gram.y" { - (yyval.node) = (Node *) (yyvsp[(1) - (1)].range); + (yyval.node) = (Node *) (yyvsp[0].range); } break; case 1027: #line 6529 "gram.y" { - (yyvsp[(1) - (2)].range)->alias = (yyvsp[(2) - (2)].alias); - (yyval.node) = (Node *) (yyvsp[(1) - (2)].range); + (yyvsp[-1].range)->alias = (yyvsp[0].alias); + (yyval.node) = (Node *) (yyvsp[-1].range); } break; @@ -21896,7 +21673,7 @@ yyreduce: #line 6534 "gram.y" { RangeFunction *n = makeNode(RangeFunction); - n->funccallnode = (yyvsp[(1) - (1)].node); + n->funccallnode = (yyvsp[0].node); n->coldeflist = NIL; (yyval.node) = (Node *) n; } @@ -21906,8 +21683,8 @@ yyreduce: #line 6541 "gram.y" { RangeFunction *n = makeNode(RangeFunction); - n->funccallnode = (yyvsp[(1) - (2)].node); - n->alias = (yyvsp[(2) - (2)].alias); + n->funccallnode = (yyvsp[-1].node); + n->alias = (yyvsp[0].alias); n->coldeflist = NIL; (yyval.node) = (Node *) n; } @@ -21917,8 +21694,8 @@ yyreduce: #line 6549 "gram.y" { RangeFunction *n = makeNode(RangeFunction); - n->funccallnode = (yyvsp[(1) - (5)].node); - n->coldeflist = (yyvsp[(4) - (5)].list); + n->funccallnode = (yyvsp[-4].node); + n->coldeflist = (yyvsp[-1].list); (yyval.node) = (Node *) n; } break; @@ -21928,10 +21705,10 @@ yyreduce: { RangeFunction *n = makeNode(RangeFunction); Alias *a = makeNode(Alias); - n->funccallnode = (yyvsp[(1) - (6)].node); - a->aliasname = (yyvsp[(3) - (6)].str); + n->funccallnode = (yyvsp[-5].node); + a->aliasname = (yyvsp[-3].str); n->alias = a; - n->coldeflist = (yyvsp[(5) - (6)].list); + n->coldeflist = (yyvsp[-1].list); (yyval.node) = (Node *) n; } break; @@ -21941,10 +21718,10 @@ yyreduce: { RangeFunction *n = makeNode(RangeFunction); Alias *a = makeNode(Alias); - n->funccallnode = (yyvsp[(1) - (5)].node); - a->aliasname = (yyvsp[(2) - (5)].str); + n->funccallnode = (yyvsp[-4].node); + a->aliasname = (yyvsp[-3].str); n->alias = a; - n->coldeflist = (yyvsp[(4) - (5)].list); + n->coldeflist = (yyvsp[-1].list); (yyval.node) = (Node *) n; } break; @@ -21963,8 +21740,8 @@ yyreduce: * However, it does seem like a good idea to emit * an error message that's better than "syntax error". */ - if (IsA((yyvsp[(1) - (1)].node), SelectStmt) && - ((SelectStmt *) (yyvsp[(1) - (1)].node))->valuesLists) + if (IsA((yyvsp[0].node), SelectStmt) && + ((SelectStmt *) (yyvsp[0].node))->valuesLists) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), errmsg("VALUES in FROM must have an alias"), @@ -21982,8 +21759,8 @@ yyreduce: #line 6602 "gram.y" { RangeSubselect *n = makeNode(RangeSubselect); - n->subquery = (yyvsp[(1) - (2)].node); - n->alias = (yyvsp[(2) - (2)].alias); + n->subquery = (yyvsp[-1].node); + n->alias = (yyvsp[0].alias); (yyval.node) = (Node *) n; } break; @@ -21991,22 +21768,22 @@ yyreduce: case 1035: #line 6609 "gram.y" { - (yyval.node) = (Node *) (yyvsp[(1) - (1)].jexpr); + (yyval.node) = (Node *) (yyvsp[0].jexpr); } break; case 1036: #line 6613 "gram.y" { - (yyvsp[(2) - (4)].jexpr)->alias = (yyvsp[(4) - (4)].alias); - (yyval.node) = (Node *) (yyvsp[(2) - (4)].jexpr); + (yyvsp[-2].jexpr)->alias = (yyvsp[0].alias); + (yyval.node) = (Node *) (yyvsp[-2].jexpr); } break; case 1037: #line 6639 "gram.y" { - (yyval.jexpr) = (yyvsp[(2) - (3)].jexpr); + (yyval.jexpr) = (yyvsp[-1].jexpr); } break; @@ -22017,8 +21794,8 @@ yyreduce: JoinExpr *n = makeNode(JoinExpr); n->jointype = JOIN_INNER; n->isNatural = FALSE; - n->larg = (yyvsp[(1) - (4)].node); - n->rarg = (yyvsp[(4) - (4)].node); + n->larg = (yyvsp[-3].node); + n->rarg = (yyvsp[0].node); n->using = NIL; n->quals = NULL; (yyval.jexpr) = n; @@ -22029,14 +21806,14 @@ yyreduce: #line 6655 "gram.y" { JoinExpr *n = makeNode(JoinExpr); - n->jointype = (yyvsp[(2) - (5)].jtype); + n->jointype = (yyvsp[-3].jtype); n->isNatural = FALSE; - n->larg = (yyvsp[(1) - (5)].node); - n->rarg = (yyvsp[(4) - (5)].node); - if ((yyvsp[(5) - (5)].node) != NULL && IsA((yyvsp[(5) - (5)].node), List)) - n->using = (List *) (yyvsp[(5) - (5)].node); /* USING clause */ + n->larg = (yyvsp[-4].node); + n->rarg = (yyvsp[-1].node); + if ((yyvsp[0].node) != NULL && IsA((yyvsp[0].node), List)) + n->using = (List *) (yyvsp[0].node); /* USING clause */ else - n->quals = (yyvsp[(5) - (5)].node); /* ON clause */ + n->quals = (yyvsp[0].node); /* ON clause */ (yyval.jexpr) = n; } break; @@ -22048,12 +21825,12 @@ yyreduce: JoinExpr *n = makeNode(JoinExpr); n->jointype = JOIN_INNER; n->isNatural = FALSE; - n->larg = (yyvsp[(1) - (4)].node); - n->rarg = (yyvsp[(3) - (4)].node); - if ((yyvsp[(4) - (4)].node) != NULL && IsA((yyvsp[(4) - (4)].node), List)) - n->using = (List *) (yyvsp[(4) - (4)].node); /* USING clause */ + n->larg = (yyvsp[-3].node); + n->rarg = (yyvsp[-1].node); + if ((yyvsp[0].node) != NULL && IsA((yyvsp[0].node), List)) + n->using = (List *) (yyvsp[0].node); /* USING clause */ else - n->quals = (yyvsp[(4) - (4)].node); /* ON clause */ + n->quals = (yyvsp[0].node); /* ON clause */ (yyval.jexpr) = n; } break; @@ -22062,10 +21839,10 @@ yyreduce: #line 6682 "gram.y" { JoinExpr *n = makeNode(JoinExpr); - n->jointype = (yyvsp[(3) - (5)].jtype); + n->jointype = (yyvsp[-2].jtype); n->isNatural = TRUE; - n->larg = (yyvsp[(1) - (5)].node); - n->rarg = (yyvsp[(5) - (5)].node); + n->larg = (yyvsp[-4].node); + n->rarg = (yyvsp[0].node); n->using = NIL; /* figure out which columns later... */ n->quals = NULL; /* fill later */ (yyval.jexpr) = n; @@ -22079,8 +21856,8 @@ yyreduce: JoinExpr *n = makeNode(JoinExpr); n->jointype = JOIN_INNER; n->isNatural = TRUE; - n->larg = (yyvsp[(1) - (4)].node); - n->rarg = (yyvsp[(4) - (4)].node); + n->larg = (yyvsp[-3].node); + n->rarg = (yyvsp[0].node); n->using = NIL; /* figure out which columns later... */ n->quals = NULL; /* fill later */ (yyval.jexpr) = n; @@ -22091,8 +21868,8 @@ yyreduce: #line 6708 "gram.y" { (yyval.alias) = makeNode(Alias); - (yyval.alias)->aliasname = (yyvsp[(2) - (5)].str); - (yyval.alias)->colnames = (yyvsp[(4) - (5)].list); + (yyval.alias)->aliasname = (yyvsp[-3].str); + (yyval.alias)->colnames = (yyvsp[-1].list); } break; @@ -22100,7 +21877,7 @@ yyreduce: #line 6714 "gram.y" { (yyval.alias) = makeNode(Alias); - (yyval.alias)->aliasname = (yyvsp[(2) - (2)].str); + (yyval.alias)->aliasname = (yyvsp[0].str); } break; @@ -22108,8 +21885,8 @@ yyreduce: #line 6719 "gram.y" { (yyval.alias) = makeNode(Alias); - (yyval.alias)->aliasname = (yyvsp[(1) - (4)].str); - (yyval.alias)->colnames = (yyvsp[(3) - (4)].list); + (yyval.alias)->aliasname = (yyvsp[-3].str); + (yyval.alias)->colnames = (yyvsp[-1].list); } break; @@ -22117,7 +21894,7 @@ yyreduce: #line 6725 "gram.y" { (yyval.alias) = makeNode(Alias); - (yyval.alias)->aliasname = (yyvsp[(1) - (1)].str); + (yyval.alias)->aliasname = (yyvsp[0].str); } break; @@ -22153,19 +21930,19 @@ yyreduce: case 1053: #line 6751 "gram.y" - { (yyval.node) = (Node *) (yyvsp[(3) - (4)].list); } + { (yyval.node) = (Node *) (yyvsp[-1].list); } break; case 1054: #line 6752 "gram.y" - { (yyval.node) = (yyvsp[(2) - (2)].node); } + { (yyval.node) = (yyvsp[0].node); } break; case 1055: #line 6758 "gram.y" { /* default inheritance */ - (yyval.range) = (yyvsp[(1) - (1)].range); + (yyval.range) = (yyvsp[0].range); (yyval.range)->inhOpt = INH_DEFAULT; (yyval.range)->alias = NULL; } @@ -22175,7 +21952,7 @@ yyreduce: #line 6765 "gram.y" { /* inheritance query */ - (yyval.range) = (yyvsp[(1) - (2)].range); + (yyval.range) = (yyvsp[-1].range); (yyval.range)->inhOpt = INH_YES; (yyval.range)->alias = NULL; } @@ -22185,7 +21962,7 @@ yyreduce: #line 6772 "gram.y" { /* no inheritance */ - (yyval.range) = (yyvsp[(2) - (2)].range); + (yyval.range) = (yyvsp[0].range); (yyval.range)->inhOpt = INH_NO; (yyval.range)->alias = NULL; } @@ -22195,7 +21972,7 @@ yyreduce: #line 6779 "gram.y" { /* no inheritance, SQL99-style syntax */ - (yyval.range) = (yyvsp[(3) - (4)].range); + (yyval.range) = (yyvsp[-1].range); (yyval.range)->inhOpt = INH_NO; (yyval.range)->alias = NULL; } @@ -22204,7 +21981,7 @@ yyreduce: case 1059: #line 6798 "gram.y" { - (yyval.range) = (yyvsp[(1) - (1)].range); + (yyval.range) = (yyvsp[0].range); } break; @@ -22212,9 +21989,9 @@ yyreduce: #line 6802 "gram.y" { Alias *alias = makeNode(Alias); - alias->aliasname = (yyvsp[(2) - (2)].str); - (yyvsp[(1) - (2)].range)->alias = alias; - (yyval.range) = (yyvsp[(1) - (2)].range); + alias->aliasname = (yyvsp[0].str); + (yyvsp[-1].range)->alias = alias; + (yyval.range) = (yyvsp[-1].range); } break; @@ -22222,20 +21999,20 @@ yyreduce: #line 6809 "gram.y" { Alias *alias = makeNode(Alias); - alias->aliasname = (yyvsp[(3) - (3)].str); - (yyvsp[(1) - (3)].range)->alias = alias; - (yyval.range) = (yyvsp[(1) - (3)].range); + alias->aliasname = (yyvsp[0].str); + (yyvsp[-2].range)->alias = alias; + (yyval.range) = (yyvsp[-2].range); } break; case 1062: #line 6818 "gram.y" - { (yyval.node) = (yyvsp[(1) - (1)].node); } + { (yyval.node) = (yyvsp[0].node); } break; case 1063: #line 6823 "gram.y" - { (yyval.node) = (yyvsp[(2) - (2)].node); } + { (yyval.node) = (yyvsp[0].node); } break; case 1064: @@ -22245,7 +22022,7 @@ yyreduce: case 1065: #line 6829 "gram.y" - { (yyval.node) = (yyvsp[(2) - (2)].node); } + { (yyval.node) = (yyvsp[0].node); } break; case 1066: @@ -22253,7 +22030,7 @@ yyreduce: { CurrentOfExpr *n = makeNode(CurrentOfExpr); /* cvarno is filled in by parse analysis */ - n->cursor_name = (yyvsp[(4) - (4)].str); + n->cursor_name = (yyvsp[0].str); n->cursor_param = 0; (yyval.node) = (Node *) n; } @@ -22265,7 +22042,7 @@ yyreduce: CurrentOfExpr *n = makeNode(CurrentOfExpr); /* cvarno is filled in by parse analysis */ n->cursor_name = NULL; - n->cursor_param = (yyvsp[(4) - (4)].ival); + n->cursor_param = (yyvsp[0].ival); (yyval.node) = (Node *) n; } break; @@ -22278,14 +22055,14 @@ yyreduce: case 1069: #line 6852 "gram.y" { - (yyval.list) = list_make1((yyvsp[(1) - (1)].node)); + (yyval.list) = list_make1((yyvsp[0].node)); } break; case 1070: #line 6856 "gram.y" { - (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); + (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].node)); } break; @@ -22293,8 +22070,8 @@ yyreduce: #line 6862 "gram.y" { ColumnDef *n = makeNode(ColumnDef); - n->colname = (yyvsp[(1) - (2)].str); - n->typename = (yyvsp[(2) - (2)].typnam); + n->colname = (yyvsp[-1].str); + n->typename = (yyvsp[0].typnam); n->constraints = NIL; n->is_local = true; (yyval.node) = (Node *)n; @@ -22304,16 +22081,16 @@ yyreduce: case 1072: #line 6883 "gram.y" { - (yyval.typnam) = (yyvsp[(1) - (2)].typnam); - (yyval.typnam)->arrayBounds = (yyvsp[(2) - (2)].list); + (yyval.typnam) = (yyvsp[-1].typnam); + (yyval.typnam)->arrayBounds = (yyvsp[0].list); } break; case 1073: #line 6888 "gram.y" { - (yyval.typnam) = (yyvsp[(2) - (3)].typnam); - (yyval.typnam)->arrayBounds = (yyvsp[(3) - (3)].list); + (yyval.typnam) = (yyvsp[-1].typnam); + (yyval.typnam)->arrayBounds = (yyvsp[0].list); (yyval.typnam)->setof = TRUE; } break; @@ -22322,8 +22099,8 @@ yyreduce: #line 6894 "gram.y" { /* SQL99's redundant syntax */ - (yyval.typnam) = (yyvsp[(1) - (5)].typnam); - (yyval.typnam)->arrayBounds = list_make1(makeInteger((yyvsp[(4) - (5)].ival))); + (yyval.typnam) = (yyvsp[-4].typnam); + (yyval.typnam)->arrayBounds = list_make1(makeInteger((yyvsp[-1].ival))); } break; @@ -22331,20 +22108,20 @@ yyreduce: #line 6900 "gram.y" { /* SQL99's redundant syntax */ - (yyval.typnam) = (yyvsp[(2) - (6)].typnam); - (yyval.typnam)->arrayBounds = list_make1(makeInteger((yyvsp[(5) - (6)].ival))); + (yyval.typnam) = (yyvsp[-4].typnam); + (yyval.typnam)->arrayBounds = list_make1(makeInteger((yyvsp[-1].ival))); (yyval.typnam)->setof = TRUE; } break; case 1076: #line 6910 "gram.y" - { (yyval.list) = lappend((yyvsp[(1) - (3)].list), makeInteger(-1)); } + { (yyval.list) = lappend((yyvsp[-2].list), makeInteger(-1)); } break; case 1077: #line 6912 "gram.y" - { (yyval.list) = lappend((yyvsp[(1) - (4)].list), makeInteger((yyvsp[(3) - (4)].ival))); } + { (yyval.list) = lappend((yyvsp[-3].list), makeInteger((yyvsp[-1].ival))); } break; case 1078: @@ -22354,88 +22131,88 @@ yyreduce: case 1079: #line 6918 "gram.y" - { (yyval.typnam) = (yyvsp[(1) - (1)].typnam); } + { (yyval.typnam) = (yyvsp[0].typnam); } break; case 1080: #line 6919 "gram.y" - { (yyval.typnam) = (yyvsp[(1) - (1)].typnam); } + { (yyval.typnam) = (yyvsp[0].typnam); } break; case 1081: #line 6920 "gram.y" - { (yyval.typnam) = (yyvsp[(1) - (1)].typnam); } + { (yyval.typnam) = (yyvsp[0].typnam); } break; case 1082: #line 6921 "gram.y" - { (yyval.typnam) = (yyvsp[(1) - (1)].typnam); } + { (yyval.typnam) = (yyvsp[0].typnam); } break; case 1083: #line 6922 "gram.y" - { (yyval.typnam) = (yyvsp[(1) - (1)].typnam); } + { (yyval.typnam) = (yyvsp[0].typnam); } break; case 1084: #line 6924 "gram.y" { - (yyval.typnam) = (yyvsp[(1) - (2)].typnam); - if ((yyvsp[(2) - (2)].ival) != INTERVAL_FULL_RANGE) - (yyval.typnam)->typmods = list_make1(makeIntConst((yyvsp[(2) - (2)].ival))); + (yyval.typnam) = (yyvsp[-1].typnam); + if ((yyvsp[0].ival) != INTERVAL_FULL_RANGE) + (yyval.typnam)->typmods = list_make1(makeIntConst((yyvsp[0].ival))); } break; case 1085: #line 6930 "gram.y" { - (yyval.typnam) = (yyvsp[(1) - (5)].typnam); - (yyval.typnam)->typmods = list_make2(makeIntConst((yyvsp[(5) - (5)].ival)), - makeIntConst((yyvsp[(3) - (5)].ival))); + (yyval.typnam) = (yyvsp[-4].typnam); + (yyval.typnam)->typmods = list_make2(makeIntConst((yyvsp[0].ival)), + makeIntConst((yyvsp[-2].ival))); } break; case 1086: #line 6949 "gram.y" - { (yyval.typnam) = (yyvsp[(1) - (1)].typnam); } + { (yyval.typnam) = (yyvsp[0].typnam); } break; case 1087: #line 6950 "gram.y" - { (yyval.typnam) = (yyvsp[(1) - (1)].typnam); } + { (yyval.typnam) = (yyvsp[0].typnam); } break; case 1088: #line 6951 "gram.y" - { (yyval.typnam) = (yyvsp[(1) - (1)].typnam); } + { (yyval.typnam) = (yyvsp[0].typnam); } break; case 1089: #line 6952 "gram.y" - { (yyval.typnam) = (yyvsp[(1) - (1)].typnam); } + { (yyval.typnam) = (yyvsp[0].typnam); } break; case 1090: #line 6964 "gram.y" { - (yyval.typnam) = makeTypeName((yyvsp[(1) - (2)].str)); - (yyval.typnam)->typmods = (yyvsp[(2) - (2)].list); - (yyval.typnam)->location = (yylsp[(1) - (2)]); + (yyval.typnam) = makeTypeName((yyvsp[-1].str)); + (yyval.typnam)->typmods = (yyvsp[0].list); + (yyval.typnam)->location = (yylsp[-1]); } break; case 1091: #line 6970 "gram.y" { - (yyval.typnam) = makeTypeNameFromNameList(lcons(makeString((yyvsp[(1) - (3)].str)), (yyvsp[(2) - (3)].list))); - (yyval.typnam)->typmods = (yyvsp[(3) - (3)].list); - (yyval.typnam)->location = (yylsp[(1) - (3)]); + (yyval.typnam) = makeTypeNameFromNameList(lcons(makeString((yyvsp[-2].str)), (yyvsp[-1].list))); + (yyval.typnam)->typmods = (yyvsp[0].list); + (yyval.typnam)->location = (yylsp[-2]); } break; case 1092: #line 6977 "gram.y" - { (yyval.list) = (yyvsp[(2) - (3)].list); } + { (yyval.list) = (yyvsp[-1].list); } break; case 1093: @@ -22447,7 +22224,7 @@ yyreduce: #line 6985 "gram.y" { (yyval.typnam) = SystemTypeName("int4"); - (yyval.typnam)->location = (yylsp[(1) - (1)]); + (yyval.typnam)->location = (yylsp[0]); } break; @@ -22455,7 +22232,7 @@ yyreduce: #line 6990 "gram.y" { (yyval.typnam) = SystemTypeName("int4"); - (yyval.typnam)->location = (yylsp[(1) - (1)]); + (yyval.typnam)->location = (yylsp[0]); } break; @@ -22463,7 +22240,7 @@ yyreduce: #line 6995 "gram.y" { (yyval.typnam) = SystemTypeName("int2"); - (yyval.typnam)->location = (yylsp[(1) - (1)]); + (yyval.typnam)->location = (yylsp[0]); } break; @@ -22471,7 +22248,7 @@ yyreduce: #line 7000 "gram.y" { (yyval.typnam) = SystemTypeName("int8"); - (yyval.typnam)->location = (yylsp[(1) - (1)]); + (yyval.typnam)->location = (yylsp[0]); } break; @@ -22479,15 +22256,15 @@ yyreduce: #line 7005 "gram.y" { (yyval.typnam) = SystemTypeName("float4"); - (yyval.typnam)->location = (yylsp[(1) - (1)]); + (yyval.typnam)->location = (yylsp[0]); } break; case 1099: #line 7010 "gram.y" { - (yyval.typnam) = (yyvsp[(2) - (2)].typnam); - (yyval.typnam)->location = (yylsp[(1) - (2)]); + (yyval.typnam) = (yyvsp[0].typnam); + (yyval.typnam)->location = (yylsp[-1]); } break; @@ -22495,7 +22272,7 @@ yyreduce: #line 7015 "gram.y" { (yyval.typnam) = SystemTypeName("float8"); - (yyval.typnam)->location = (yylsp[(1) - (2)]); + (yyval.typnam)->location = (yylsp[-1]); } break; @@ -22503,8 +22280,8 @@ yyreduce: #line 7020 "gram.y" { (yyval.typnam) = SystemTypeName("numeric"); - (yyval.typnam)->typmods = (yyvsp[(2) - (2)].list); - (yyval.typnam)->location = (yylsp[(1) - (2)]); + (yyval.typnam)->typmods = (yyvsp[0].list); + (yyval.typnam)->location = (yylsp[-1]); } break; @@ -22512,8 +22289,8 @@ yyreduce: #line 7026 "gram.y" { (yyval.typnam) = SystemTypeName("numeric"); - (yyval.typnam)->typmods = (yyvsp[(2) - (2)].list); - (yyval.typnam)->location = (yylsp[(1) - (2)]); + (yyval.typnam)->typmods = (yyvsp[0].list); + (yyval.typnam)->location = (yylsp[-1]); } break; @@ -22521,8 +22298,8 @@ yyreduce: #line 7032 "gram.y" { (yyval.typnam) = SystemTypeName("numeric"); - (yyval.typnam)->typmods = (yyvsp[(2) - (2)].list); - (yyval.typnam)->location = (yylsp[(1) - (2)]); + (yyval.typnam)->typmods = (yyvsp[0].list); + (yyval.typnam)->location = (yylsp[-1]); } break; @@ -22530,7 +22307,7 @@ yyreduce: #line 7038 "gram.y" { (yyval.typnam) = SystemTypeName("bool"); - (yyval.typnam)->location = (yylsp[(1) - (1)]); + (yyval.typnam)->location = (yylsp[0]); } break; @@ -22541,13 +22318,13 @@ yyreduce: * Check FLOAT() precision limits assuming IEEE floating * types - thomas 1997-09-18 */ - if ((yyvsp[(2) - (3)].ival) < 1) + if ((yyvsp[-1].ival) < 1) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), errmsg("precision for type float must be at least 1 bit"))); - else if ((yyvsp[(2) - (3)].ival) <= 24) + else if ((yyvsp[-1].ival) <= 24) (yyval.typnam) = SystemTypeName("float4"); - else if ((yyvsp[(2) - (3)].ival) <= 53) + else if ((yyvsp[-1].ival) <= 53) (yyval.typnam) = SystemTypeName("float8"); else ereport(ERROR, @@ -22566,28 +22343,28 @@ yyreduce: case 1107: #line 7074 "gram.y" { - (yyval.typnam) = (yyvsp[(1) - (1)].typnam); + (yyval.typnam) = (yyvsp[0].typnam); } break; case 1108: #line 7078 "gram.y" { - (yyval.typnam) = (yyvsp[(1) - (1)].typnam); + (yyval.typnam) = (yyvsp[0].typnam); } break; case 1109: #line 7086 "gram.y" { - (yyval.typnam) = (yyvsp[(1) - (1)].typnam); + (yyval.typnam) = (yyvsp[0].typnam); } break; case 1110: #line 7090 "gram.y" { - (yyval.typnam) = (yyvsp[(1) - (1)].typnam); + (yyval.typnam) = (yyvsp[0].typnam); (yyval.typnam)->typmods = NIL; } break; @@ -22597,10 +22374,10 @@ yyreduce: { char *typname; - typname = (yyvsp[(2) - (5)].boolean) ? "varbit" : "bit"; + typname = (yyvsp[-3].boolean) ? "varbit" : "bit"; (yyval.typnam) = SystemTypeName(typname); - (yyval.typnam)->typmods = (yyvsp[(4) - (5)].list); - (yyval.typnam)->location = (yylsp[(1) - (5)]); + (yyval.typnam)->typmods = (yyvsp[-1].list); + (yyval.typnam)->location = (yylsp[-4]); } break; @@ -22608,7 +22385,7 @@ yyreduce: #line 7110 "gram.y" { /* bit defaults to bit(1), varbit to no limit */ - if ((yyvsp[(2) - (2)].boolean)) + if ((yyvsp[0].boolean)) { (yyval.typnam) = SystemTypeName("varbit"); } @@ -22617,28 +22394,28 @@ yyreduce: (yyval.typnam) = SystemTypeName("bit"); (yyval.typnam)->typmods = list_make1(makeIntConst(1)); } - (yyval.typnam)->location = (yylsp[(1) - (2)]); + (yyval.typnam)->location = (yylsp[-1]); } break; case 1113: #line 7131 "gram.y" { - (yyval.typnam) = (yyvsp[(1) - (1)].typnam); + (yyval.typnam) = (yyvsp[0].typnam); } break; case 1114: #line 7135 "gram.y" { - (yyval.typnam) = (yyvsp[(1) - (1)].typnam); + (yyval.typnam) = (yyvsp[0].typnam); } break; case 1115: #line 7141 "gram.y" { - (yyval.typnam) = (yyvsp[(1) - (1)].typnam); + (yyval.typnam) = (yyvsp[0].typnam); } break; @@ -22651,7 +22428,7 @@ yyreduce: * of one, but should not be constrained if the length * was not specified. */ - (yyval.typnam) = (yyvsp[(1) - (1)].typnam); + (yyval.typnam) = (yyvsp[0].typnam); (yyval.typnam)->typmods = NIL; } break; @@ -22659,55 +22436,55 @@ yyreduce: case 1117: #line 7158 "gram.y" { - if (((yyvsp[(5) - (5)].str) != NULL) && (strcmp((yyvsp[(5) - (5)].str), "sql_text") != 0)) + if (((yyvsp[0].str) != NULL) && (strcmp((yyvsp[0].str), "sql_text") != 0)) { char *type; - type = palloc(strlen((yyvsp[(1) - (5)].str)) + 1 + strlen((yyvsp[(5) - (5)].str)) + 1); - strcpy(type, (yyvsp[(1) - (5)].str)); + type = palloc(strlen((yyvsp[-4].str)) + 1 + strlen((yyvsp[0].str)) + 1); + strcpy(type, (yyvsp[-4].str)); strcat(type, "_"); - strcat(type, (yyvsp[(5) - (5)].str)); - (yyvsp[(1) - (5)].str) = type; + strcat(type, (yyvsp[0].str)); + (yyvsp[-4].str) = type; } - (yyval.typnam) = SystemTypeName((yyvsp[(1) - (5)].str)); - (yyval.typnam)->typmods = list_make1(makeIntConst((yyvsp[(3) - (5)].ival))); - (yyval.typnam)->location = (yylsp[(1) - (5)]); + (yyval.typnam) = SystemTypeName((yyvsp[-4].str)); + (yyval.typnam)->typmods = list_make1(makeIntConst((yyvsp[-2].ival))); + (yyval.typnam)->location = (yylsp[-4]); } break; case 1118: #line 7177 "gram.y" { - if (((yyvsp[(2) - (2)].str) != NULL) && (strcmp((yyvsp[(2) - (2)].str), "sql_text") != 0)) + if (((yyvsp[0].str) != NULL) && (strcmp((yyvsp[0].str), "sql_text") != 0)) { char *type; - type = palloc(strlen((yyvsp[(1) - (2)].str)) + 1 + strlen((yyvsp[(2) - (2)].str)) + 1); - strcpy(type, (yyvsp[(1) - (2)].str)); + type = palloc(strlen((yyvsp[-1].str)) + 1 + strlen((yyvsp[0].str)) + 1); + strcpy(type, (yyvsp[-1].str)); strcat(type, "_"); - strcat(type, (yyvsp[(2) - (2)].str)); - (yyvsp[(1) - (2)].str) = type; + strcat(type, (yyvsp[0].str)); + (yyvsp[-1].str) = type; } - (yyval.typnam) = SystemTypeName((yyvsp[(1) - (2)].str)); + (yyval.typnam) = SystemTypeName((yyvsp[-1].str)); /* char defaults to char(1), varchar to no limit */ - if (strcmp((yyvsp[(1) - (2)].str), "char") == 0) + if (strcmp((yyvsp[-1].str), "char") == 0) (yyval.typnam)->typmods = list_make1(makeIntConst(1)); - (yyval.typnam)->location = (yylsp[(1) - (2)]); + (yyval.typnam)->location = (yylsp[-1]); } break; case 1119: #line 7200 "gram.y" - { (yyval.str) = (yyvsp[(2) - (2)].boolean) ? "varchar": "char"; } + { (yyval.str) = (yyvsp[0].boolean) ? "varchar": "char"; } break; case 1120: #line 7202 "gram.y" - { (yyval.str) = (yyvsp[(2) - (2)].boolean) ? "varchar": "char"; } + { (yyval.str) = (yyvsp[0].boolean) ? "varchar": "char"; } break; case 1121: @@ -22717,17 +22494,17 @@ yyreduce: case 1122: #line 7206 "gram.y" - { (yyval.str) = (yyvsp[(3) - (3)].boolean) ? "varchar": "char"; } + { (yyval.str) = (yyvsp[0].boolean) ? "varchar": "char"; } break; case 1123: #line 7208 "gram.y" - { (yyval.str) = (yyvsp[(3) - (3)].boolean) ? "varchar": "char"; } + { (yyval.str) = (yyvsp[0].boolean) ? "varchar": "char"; } break; case 1124: #line 7210 "gram.y" - { (yyval.str) = (yyvsp[(2) - (2)].boolean) ? "varchar": "char"; } + { (yyval.str) = (yyvsp[0].boolean) ? "varchar": "char"; } break; case 1125: @@ -22742,7 +22519,7 @@ yyreduce: case 1127: #line 7219 "gram.y" - { (yyval.str) = (yyvsp[(3) - (3)].str); } + { (yyval.str) = (yyvsp[0].str); } break; case 1128: @@ -22753,54 +22530,54 @@ yyreduce: case 1129: #line 7228 "gram.y" { - if ((yyvsp[(5) - (5)].boolean)) + if ((yyvsp[0].boolean)) (yyval.typnam) = SystemTypeName("timestamptz"); else (yyval.typnam) = SystemTypeName("timestamp"); /* XXX the timezone field seems to be unused * - thomas 2001-09-06 */ - (yyval.typnam)->timezone = (yyvsp[(5) - (5)].boolean); - (yyval.typnam)->typmods = list_make1(makeIntConst((yyvsp[(3) - (5)].ival))); - (yyval.typnam)->location = (yylsp[(1) - (5)]); + (yyval.typnam)->timezone = (yyvsp[0].boolean); + (yyval.typnam)->typmods = list_make1(makeIntConst((yyvsp[-2].ival))); + (yyval.typnam)->location = (yylsp[-4]); } break; case 1130: #line 7241 "gram.y" { - if ((yyvsp[(2) - (2)].boolean)) + if ((yyvsp[0].boolean)) (yyval.typnam) = SystemTypeName("timestamptz"); else (yyval.typnam) = SystemTypeName("timestamp"); /* XXX the timezone field seems to be unused * - thomas 2001-09-06 */ - (yyval.typnam)->timezone = (yyvsp[(2) - (2)].boolean); - (yyval.typnam)->location = (yylsp[(1) - (2)]); + (yyval.typnam)->timezone = (yyvsp[0].boolean); + (yyval.typnam)->location = (yylsp[-1]); } break; case 1131: #line 7253 "gram.y" { - if ((yyvsp[(5) - (5)].boolean)) + if ((yyvsp[0].boolean)) (yyval.typnam) = SystemTypeName("timetz"); else (yyval.typnam) = SystemTypeName("time"); - (yyval.typnam)->typmods = list_make1(makeIntConst((yyvsp[(3) - (5)].ival))); - (yyval.typnam)->location = (yylsp[(1) - (5)]); + (yyval.typnam)->typmods = list_make1(makeIntConst((yyvsp[-2].ival))); + (yyval.typnam)->location = (yylsp[-4]); } break; case 1132: #line 7262 "gram.y" { - if ((yyvsp[(2) - (2)].boolean)) + if ((yyvsp[0].boolean)) (yyval.typnam) = SystemTypeName("timetz"); else (yyval.typnam) = SystemTypeName("time"); - (yyval.typnam)->location = (yylsp[(1) - (2)]); + (yyval.typnam)->location = (yylsp[-1]); } break; @@ -22808,7 +22585,7 @@ yyreduce: #line 7273 "gram.y" { (yyval.typnam) = SystemTypeName("interval"); - (yyval.typnam)->location = (yylsp[(1) - (1)]); + (yyval.typnam)->location = (yylsp[0]); } break; @@ -22902,12 +22679,12 @@ yyreduce: case 1151: #line 7335 "gram.y" - { (yyval.node) = (yyvsp[(1) - (1)].node); } + { (yyval.node) = (yyvsp[0].node); } break; case 1152: #line 7337 "gram.y" - { (yyval.node) = makeTypeCast((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].typnam)); } + { (yyval.node) = makeTypeCast((yyvsp[-2].node), (yyvsp[0].typnam)); } break; case 1153: @@ -22915,102 +22692,102 @@ yyreduce: { FuncCall *n = makeNode(FuncCall); n->funcname = SystemFuncName("timezone"); - n->args = list_make2((yyvsp[(5) - (5)].node), (yyvsp[(1) - (5)].node)); + n->args = list_make2((yyvsp[0].node), (yyvsp[-4].node)); n->agg_star = FALSE; n->agg_distinct = FALSE; - n->location = (yylsp[(2) - (5)]); + n->location = (yylsp[-3]); (yyval.node) = (Node *) n; } break; case 1154: #line 7358 "gram.y" - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "+", NULL, (yyvsp[(2) - (2)].node), (yylsp[(1) - (2)])); } + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "+", NULL, (yyvsp[0].node), (yylsp[-1])); } break; case 1155: #line 7360 "gram.y" - { (yyval.node) = doNegate((yyvsp[(2) - (2)].node), (yylsp[(1) - (2)])); } + { (yyval.node) = doNegate((yyvsp[0].node), (yylsp[-1])); } break; case 1156: #line 7362 "gram.y" - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "+", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); } + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "+", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } break; case 1157: #line 7364 "gram.y" - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "-", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); } + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "-", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } break; case 1158: #line 7366 "gram.y" - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "*", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); } + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "*", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } break; case 1159: #line 7368 "gram.y" - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "/", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); } + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "/", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } break; case 1160: #line 7370 "gram.y" - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "%", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); } + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "%", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } break; case 1161: #line 7372 "gram.y" - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "^", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); } + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "^", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } break; case 1162: #line 7374 "gram.y" - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "<", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); } + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "<", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } break; case 1163: #line 7376 "gram.y" - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, ">", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); } + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, ">", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } break; case 1164: #line 7378 "gram.y" - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "=", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); } + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "=", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } break; case 1165: #line 7381 "gram.y" - { (yyval.node) = (Node *) makeA_Expr(AEXPR_OP, (yyvsp[(2) - (3)].list), (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); } + { (yyval.node) = (Node *) makeA_Expr(AEXPR_OP, (yyvsp[-1].list), (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } break; case 1166: #line 7383 "gram.y" - { (yyval.node) = (Node *) makeA_Expr(AEXPR_OP, (yyvsp[(1) - (2)].list), NULL, (yyvsp[(2) - (2)].node), (yylsp[(1) - (2)])); } + { (yyval.node) = (Node *) makeA_Expr(AEXPR_OP, (yyvsp[-1].list), NULL, (yyvsp[0].node), (yylsp[-1])); } break; case 1167: #line 7385 "gram.y" - { (yyval.node) = (Node *) makeA_Expr(AEXPR_OP, (yyvsp[(2) - (2)].list), (yyvsp[(1) - (2)].node), NULL, (yylsp[(2) - (2)])); } + { (yyval.node) = (Node *) makeA_Expr(AEXPR_OP, (yyvsp[0].list), (yyvsp[-1].node), NULL, (yylsp[0])); } break; case 1168: #line 7388 "gram.y" - { (yyval.node) = (Node *) makeA_Expr(AEXPR_AND, NIL, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); } + { (yyval.node) = (Node *) makeA_Expr(AEXPR_AND, NIL, (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } break; case 1169: #line 7390 "gram.y" - { (yyval.node) = (Node *) makeA_Expr(AEXPR_OR, NIL, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); } + { (yyval.node) = (Node *) makeA_Expr(AEXPR_OR, NIL, (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } break; case 1170: #line 7392 "gram.y" - { (yyval.node) = (Node *) makeA_Expr(AEXPR_NOT, NIL, NULL, (yyvsp[(2) - (2)].node), (yylsp[(1) - (2)])); } + { (yyval.node) = (Node *) makeA_Expr(AEXPR_NOT, NIL, NULL, (yyvsp[0].node), (yylsp[-1])); } break; case 1171: #line 7395 "gram.y" - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "~~", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); } + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "~~", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } break; case 1172: @@ -23018,17 +22795,17 @@ yyreduce: { FuncCall *n = makeNode(FuncCall); n->funcname = SystemFuncName("like_escape"); - n->args = list_make2((yyvsp[(3) - (5)].node), (yyvsp[(5) - (5)].node)); + n->args = list_make2((yyvsp[-2].node), (yyvsp[0].node)); n->agg_star = FALSE; n->agg_distinct = FALSE; - n->location = (yylsp[(4) - (5)]); - (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "~~", (yyvsp[(1) - (5)].node), (Node *) n, (yylsp[(2) - (5)])); + n->location = (yylsp[-1]); + (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "~~", (yyvsp[-4].node), (Node *) n, (yylsp[-3])); } break; case 1173: #line 7407 "gram.y" - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "!~~", (yyvsp[(1) - (4)].node), (yyvsp[(4) - (4)].node), (yylsp[(2) - (4)])); } + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "!~~", (yyvsp[-3].node), (yyvsp[0].node), (yylsp[-2])); } break; case 1174: @@ -23036,17 +22813,17 @@ yyreduce: { FuncCall *n = makeNode(FuncCall); n->funcname = SystemFuncName("like_escape"); - n->args = list_make2((yyvsp[(4) - (6)].node), (yyvsp[(6) - (6)].node)); + n->args = list_make2((yyvsp[-2].node), (yyvsp[0].node)); n->agg_star = FALSE; n->agg_distinct = FALSE; - n->location = (yylsp[(5) - (6)]); - (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "!~~", (yyvsp[(1) - (6)].node), (Node *) n, (yylsp[(2) - (6)])); + n->location = (yylsp[-1]); + (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "!~~", (yyvsp[-5].node), (Node *) n, (yylsp[-4])); } break; case 1175: #line 7419 "gram.y" - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "~~*", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); } + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "~~*", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } break; case 1176: @@ -23054,17 +22831,17 @@ yyreduce: { FuncCall *n = makeNode(FuncCall); n->funcname = SystemFuncName("like_escape"); - n->args = list_make2((yyvsp[(3) - (5)].node), (yyvsp[(5) - (5)].node)); + n->args = list_make2((yyvsp[-2].node), (yyvsp[0].node)); n->agg_star = FALSE; n->agg_distinct = FALSE; - n->location = (yylsp[(4) - (5)]); - (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "~~*", (yyvsp[(1) - (5)].node), (Node *) n, (yylsp[(2) - (5)])); + n->location = (yylsp[-1]); + (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "~~*", (yyvsp[-4].node), (Node *) n, (yylsp[-3])); } break; case 1177: #line 7431 "gram.y" - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "!~~*", (yyvsp[(1) - (4)].node), (yyvsp[(4) - (4)].node), (yylsp[(2) - (4)])); } + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "!~~*", (yyvsp[-3].node), (yyvsp[0].node), (yylsp[-2])); } break; case 1178: @@ -23072,11 +22849,11 @@ yyreduce: { FuncCall *n = makeNode(FuncCall); n->funcname = SystemFuncName("like_escape"); - n->args = list_make2((yyvsp[(4) - (6)].node), (yyvsp[(6) - (6)].node)); + n->args = list_make2((yyvsp[-2].node), (yyvsp[0].node)); n->agg_star = FALSE; n->agg_distinct = FALSE; - n->location = (yylsp[(5) - (6)]); - (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "!~~*", (yyvsp[(1) - (6)].node), (Node *) n, (yylsp[(2) - (6)])); + n->location = (yylsp[-1]); + (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "!~~*", (yyvsp[-5].node), (Node *) n, (yylsp[-4])); } break; @@ -23087,11 +22864,11 @@ yyreduce: FuncCall *n = makeNode(FuncCall); c->val.type = T_Null; n->funcname = SystemFuncName("similar_escape"); - n->args = list_make2((yyvsp[(4) - (4)].node), (Node *) c); + n->args = list_make2((yyvsp[0].node), (Node *) c); n->agg_star = FALSE; n->agg_distinct = FALSE; - n->location = (yylsp[(2) - (4)]); - (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "~", (yyvsp[(1) - (4)].node), (Node *) n, (yylsp[(2) - (4)])); + n->location = (yylsp[-2]); + (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "~", (yyvsp[-3].node), (Node *) n, (yylsp[-2])); } break; @@ -23100,11 +22877,11 @@ yyreduce: { FuncCall *n = makeNode(FuncCall); n->funcname = SystemFuncName("similar_escape"); - n->args = list_make2((yyvsp[(4) - (6)].node), (yyvsp[(6) - (6)].node)); + n->args = list_make2((yyvsp[-2].node), (yyvsp[0].node)); n->agg_star = FALSE; n->agg_distinct = FALSE; - n->location = (yylsp[(5) - (6)]); - (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "~", (yyvsp[(1) - (6)].node), (Node *) n, (yylsp[(2) - (6)])); + n->location = (yylsp[-1]); + (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "~", (yyvsp[-5].node), (Node *) n, (yylsp[-4])); } break; @@ -23115,11 +22892,11 @@ yyreduce: FuncCall *n = makeNode(FuncCall); c->val.type = T_Null; n->funcname = SystemFuncName("similar_escape"); - n->args = list_make2((yyvsp[(5) - (5)].node), (Node *) c); + n->args = list_make2((yyvsp[0].node), (Node *) c); n->agg_star = FALSE; n->agg_distinct = FALSE; - n->location = (yylsp[(5) - (5)]); - (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "!~", (yyvsp[(1) - (5)].node), (Node *) n, (yylsp[(2) - (5)])); + n->location = (yylsp[0]); + (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "!~", (yyvsp[-4].node), (Node *) n, (yylsp[-3])); } break; @@ -23128,11 +22905,11 @@ yyreduce: { FuncCall *n = makeNode(FuncCall); n->funcname = SystemFuncName("similar_escape"); - n->args = list_make2((yyvsp[(5) - (7)].node), (yyvsp[(7) - (7)].node)); + n->args = list_make2((yyvsp[-2].node), (yyvsp[0].node)); n->agg_star = FALSE; n->agg_distinct = FALSE; - n->location = (yylsp[(6) - (7)]); - (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "!~", (yyvsp[(1) - (7)].node), (Node *) n, (yylsp[(2) - (7)])); + n->location = (yylsp[-1]); + (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "!~", (yyvsp[-6].node), (Node *) n, (yylsp[-5])); } break; @@ -23140,7 +22917,7 @@ yyreduce: #line 7498 "gram.y" { NullTest *n = makeNode(NullTest); - n->arg = (Expr *) (yyvsp[(1) - (3)].node); + n->arg = (Expr *) (yyvsp[-2].node); n->nulltesttype = IS_NULL; (yyval.node) = (Node *)n; } @@ -23150,7 +22927,7 @@ yyreduce: #line 7505 "gram.y" { NullTest *n = makeNode(NullTest); - n->arg = (Expr *) (yyvsp[(1) - (2)].node); + n->arg = (Expr *) (yyvsp[-1].node); n->nulltesttype = IS_NULL; (yyval.node) = (Node *)n; } @@ -23160,7 +22937,7 @@ yyreduce: #line 7512 "gram.y" { NullTest *n = makeNode(NullTest); - n->arg = (Expr *) (yyvsp[(1) - (4)].node); + n->arg = (Expr *) (yyvsp[-3].node); n->nulltesttype = IS_NOT_NULL; (yyval.node) = (Node *)n; } @@ -23170,7 +22947,7 @@ yyreduce: #line 7519 "gram.y" { NullTest *n = makeNode(NullTest); - n->arg = (Expr *) (yyvsp[(1) - (2)].node); + n->arg = (Expr *) (yyvsp[-1].node); n->nulltesttype = IS_NOT_NULL; (yyval.node) = (Node *)n; } @@ -23179,7 +22956,7 @@ yyreduce: case 1187: #line 7526 "gram.y" { - (yyval.node) = (Node *)makeOverlaps((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].list), (yylsp[(2) - (3)])); + (yyval.node) = (Node *)makeOverlaps((yyvsp[-2].list), (yyvsp[0].list), (yylsp[-1])); } break; @@ -23187,7 +22964,7 @@ yyreduce: #line 7530 "gram.y" { BooleanTest *b = makeNode(BooleanTest); - b->arg = (Expr *) (yyvsp[(1) - (3)].node); + b->arg = (Expr *) (yyvsp[-2].node); b->booltesttype = IS_TRUE; (yyval.node) = (Node *)b; } @@ -23197,7 +22974,7 @@ yyreduce: #line 7537 "gram.y" { BooleanTest *b = makeNode(BooleanTest); - b->arg = (Expr *) (yyvsp[(1) - (4)].node); + b->arg = (Expr *) (yyvsp[-3].node); b->booltesttype = IS_NOT_TRUE; (yyval.node) = (Node *)b; } @@ -23207,7 +22984,7 @@ yyreduce: #line 7544 "gram.y" { BooleanTest *b = makeNode(BooleanTest); - b->arg = (Expr *) (yyvsp[(1) - (3)].node); + b->arg = (Expr *) (yyvsp[-2].node); b->booltesttype = IS_FALSE; (yyval.node) = (Node *)b; } @@ -23217,7 +22994,7 @@ yyreduce: #line 7551 "gram.y" { BooleanTest *b = makeNode(BooleanTest); - b->arg = (Expr *) (yyvsp[(1) - (4)].node); + b->arg = (Expr *) (yyvsp[-3].node); b->booltesttype = IS_NOT_FALSE; (yyval.node) = (Node *)b; } @@ -23227,7 +23004,7 @@ yyreduce: #line 7558 "gram.y" { BooleanTest *b = makeNode(BooleanTest); - b->arg = (Expr *) (yyvsp[(1) - (3)].node); + b->arg = (Expr *) (yyvsp[-2].node); b->booltesttype = IS_UNKNOWN; (yyval.node) = (Node *)b; } @@ -23237,7 +23014,7 @@ yyreduce: #line 7565 "gram.y" { BooleanTest *b = makeNode(BooleanTest); - b->arg = (Expr *) (yyvsp[(1) - (4)].node); + b->arg = (Expr *) (yyvsp[-3].node); b->booltesttype = IS_NOT_UNKNOWN; (yyval.node) = (Node *)b; } @@ -23246,7 +23023,7 @@ yyreduce: case 1194: #line 7572 "gram.y" { - (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_DISTINCT, "=", (yyvsp[(1) - (5)].node), (yyvsp[(5) - (5)].node), (yylsp[(2) - (5)])); + (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_DISTINCT, "=", (yyvsp[-4].node), (yyvsp[0].node), (yylsp[-3])); } break; @@ -23255,8 +23032,8 @@ yyreduce: { (yyval.node) = (Node *) makeA_Expr(AEXPR_NOT, NIL, NULL, (Node *) makeSimpleA_Expr(AEXPR_DISTINCT, - "=", (yyvsp[(1) - (6)].node), (yyvsp[(6) - (6)].node), (yylsp[(2) - (6)])), - (yylsp[(2) - (6)])); + "=", (yyvsp[-5].node), (yyvsp[0].node), (yylsp[-4])), + (yylsp[-4])); } break; @@ -23264,14 +23041,14 @@ yyreduce: case 1196: #line 7584 "gram.y" { - (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OF, "=", (yyvsp[(1) - (6)].node), (Node *) (yyvsp[(5) - (6)].list), (yylsp[(2) - (6)])); + (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OF, "=", (yyvsp[-5].node), (Node *) (yyvsp[-1].list), (yylsp[-4])); } break; case 1197: #line 7588 "gram.y" { - (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OF, "<>", (yyvsp[(1) - (7)].node), (Node *) (yyvsp[(6) - (7)].list), (yylsp[(2) - (7)])); + (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OF, "<>", (yyvsp[-6].node), (Node *) (yyvsp[-1].list), (yylsp[-5])); } break; @@ -23279,9 +23056,9 @@ yyreduce: #line 7592 "gram.y" { (yyval.node) = (Node *) makeA_Expr(AEXPR_AND, NIL, - (Node *) makeSimpleA_Expr(AEXPR_OP, ">=", (yyvsp[(1) - (6)].node), (yyvsp[(4) - (6)].node), (yylsp[(2) - (6)])), - (Node *) makeSimpleA_Expr(AEXPR_OP, "<=", (yyvsp[(1) - (6)].node), (yyvsp[(6) - (6)].node), (yylsp[(2) - (6)])), - (yylsp[(2) - (6)])); + (Node *) makeSimpleA_Expr(AEXPR_OP, ">=", (yyvsp[-5].node), (yyvsp[-2].node), (yylsp[-4])), + (Node *) makeSimpleA_Expr(AEXPR_OP, "<=", (yyvsp[-5].node), (yyvsp[0].node), (yylsp[-4])), + (yylsp[-4])); } break; @@ -23289,9 +23066,9 @@ yyreduce: #line 7599 "gram.y" { (yyval.node) = (Node *) makeA_Expr(AEXPR_OR, NIL, - (Node *) makeSimpleA_Expr(AEXPR_OP, "<", (yyvsp[(1) - (7)].node), (yyvsp[(5) - (7)].node), (yylsp[(2) - (7)])), - (Node *) makeSimpleA_Expr(AEXPR_OP, ">", (yyvsp[(1) - (7)].node), (yyvsp[(7) - (7)].node), (yylsp[(2) - (7)])), - (yylsp[(2) - (7)])); + (Node *) makeSimpleA_Expr(AEXPR_OP, "<", (yyvsp[-6].node), (yyvsp[-2].node), (yylsp[-5])), + (Node *) makeSimpleA_Expr(AEXPR_OP, ">", (yyvsp[-6].node), (yyvsp[0].node), (yylsp[-5])), + (yylsp[-5])); } break; @@ -23300,14 +23077,14 @@ yyreduce: { (yyval.node) = (Node *) makeA_Expr(AEXPR_OR, NIL, (Node *) makeA_Expr(AEXPR_AND, NIL, - (Node *) makeSimpleA_Expr(AEXPR_OP, ">=", (yyvsp[(1) - (6)].node), (yyvsp[(4) - (6)].node), (yylsp[(2) - (6)])), - (Node *) makeSimpleA_Expr(AEXPR_OP, "<=", (yyvsp[(1) - (6)].node), (yyvsp[(6) - (6)].node), (yylsp[(2) - (6)])), - (yylsp[(2) - (6)])), + (Node *) makeSimpleA_Expr(AEXPR_OP, ">=", (yyvsp[-5].node), (yyvsp[-2].node), (yylsp[-4])), + (Node *) makeSimpleA_Expr(AEXPR_OP, "<=", (yyvsp[-5].node), (yyvsp[0].node), (yylsp[-4])), + (yylsp[-4])), (Node *) makeA_Expr(AEXPR_AND, NIL, - (Node *) makeSimpleA_Expr(AEXPR_OP, ">=", (yyvsp[(1) - (6)].node), (yyvsp[(6) - (6)].node), (yylsp[(2) - (6)])), - (Node *) makeSimpleA_Expr(AEXPR_OP, "<=", (yyvsp[(1) - (6)].node), (yyvsp[(4) - (6)].node), (yylsp[(2) - (6)])), - (yylsp[(2) - (6)])), - (yylsp[(2) - (6)])); + (Node *) makeSimpleA_Expr(AEXPR_OP, ">=", (yyvsp[-5].node), (yyvsp[0].node), (yylsp[-4])), + (Node *) makeSimpleA_Expr(AEXPR_OP, "<=", (yyvsp[-5].node), (yyvsp[-2].node), (yylsp[-4])), + (yylsp[-4])), + (yylsp[-4])); } break; @@ -23316,14 +23093,14 @@ yyreduce: { (yyval.node) = (Node *) makeA_Expr(AEXPR_AND, NIL, (Node *) makeA_Expr(AEXPR_OR, NIL, - (Node *) makeSimpleA_Expr(AEXPR_OP, "<", (yyvsp[(1) - (7)].node), (yyvsp[(5) - (7)].node), (yylsp[(2) - (7)])), - (Node *) makeSimpleA_Expr(AEXPR_OP, ">", (yyvsp[(1) - (7)].node), (yyvsp[(7) - (7)].node), (yylsp[(2) - (7)])), - (yylsp[(2) - (7)])), + (Node *) makeSimpleA_Expr(AEXPR_OP, "<", (yyvsp[-6].node), (yyvsp[-2].node), (yylsp[-5])), + (Node *) makeSimpleA_Expr(AEXPR_OP, ">", (yyvsp[-6].node), (yyvsp[0].node), (yylsp[-5])), + (yylsp[-5])), (Node *) makeA_Expr(AEXPR_OR, NIL, - (Node *) makeSimpleA_Expr(AEXPR_OP, "<", (yyvsp[(1) - (7)].node), (yyvsp[(7) - (7)].node), (yylsp[(2) - (7)])), - (Node *) makeSimpleA_Expr(AEXPR_OP, ">", (yyvsp[(1) - (7)].node), (yyvsp[(5) - (7)].node), (yylsp[(2) - (7)])), - (yylsp[(2) - (7)])), - (yylsp[(2) - (7)])); + (Node *) makeSimpleA_Expr(AEXPR_OP, "<", (yyvsp[-6].node), (yyvsp[0].node), (yylsp[-5])), + (Node *) makeSimpleA_Expr(AEXPR_OP, ">", (yyvsp[-6].node), (yyvsp[-2].node), (yylsp[-5])), + (yylsp[-5])), + (yylsp[-5])); } break; @@ -23331,19 +23108,19 @@ yyreduce: #line 7632 "gram.y" { /* in_expr returns a SubLink or a list of a_exprs */ - if (IsA((yyvsp[(3) - (3)].node), SubLink)) + if (IsA((yyvsp[0].node), SubLink)) { /* generate foo = ANY (subquery) */ - SubLink *n = (SubLink *) (yyvsp[(3) - (3)].node); + SubLink *n = (SubLink *) (yyvsp[0].node); n->subLinkType = ANY_SUBLINK; - n->testexpr = (yyvsp[(1) - (3)].node); + n->testexpr = (yyvsp[-2].node); n->operName = list_make1(makeString("=")); (yyval.node) = (Node *)n; } else { /* generate scalar IN expression */ - (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_IN, "=", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); + (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_IN, "=", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } } break; @@ -23352,21 +23129,21 @@ yyreduce: #line 7650 "gram.y" { /* in_expr returns a SubLink or a list of a_exprs */ - if (IsA((yyvsp[(4) - (4)].node), SubLink)) + if (IsA((yyvsp[0].node), SubLink)) { /* generate NOT (foo = ANY (subquery)) */ /* Make an = ANY node */ - SubLink *n = (SubLink *) (yyvsp[(4) - (4)].node); + SubLink *n = (SubLink *) (yyvsp[0].node); n->subLinkType = ANY_SUBLINK; - n->testexpr = (yyvsp[(1) - (4)].node); + n->testexpr = (yyvsp[-3].node); n->operName = list_make1(makeString("=")); /* Stick a NOT on top */ - (yyval.node) = (Node *) makeA_Expr(AEXPR_NOT, NIL, NULL, (Node *) n, (yylsp[(2) - (4)])); + (yyval.node) = (Node *) makeA_Expr(AEXPR_NOT, NIL, NULL, (Node *) n, (yylsp[-2])); } else { /* generate scalar NOT IN expression */ - (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_IN, "<>", (yyvsp[(1) - (4)].node), (yyvsp[(4) - (4)].node), (yylsp[(2) - (4)])); + (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_IN, "<>", (yyvsp[-3].node), (yyvsp[0].node), (yylsp[-2])); } } break; @@ -23375,10 +23152,10 @@ yyreduce: #line 7670 "gram.y" { SubLink *n = makeNode(SubLink); - n->subLinkType = (yyvsp[(3) - (4)].ival); - n->testexpr = (yyvsp[(1) - (4)].node); - n->operName = (yyvsp[(2) - (4)].list); - n->subselect = (yyvsp[(4) - (4)].node); + n->subLinkType = (yyvsp[-1].ival); + n->testexpr = (yyvsp[-3].node); + n->operName = (yyvsp[-2].list); + n->subselect = (yyvsp[0].node); (yyval.node) = (Node *)n; } break; @@ -23386,10 +23163,10 @@ yyreduce: case 1205: #line 7679 "gram.y" { - if ((yyvsp[(3) - (6)].ival) == ANY_SUBLINK) - (yyval.node) = (Node *) makeA_Expr(AEXPR_OP_ANY, (yyvsp[(2) - (6)].list), (yyvsp[(1) - (6)].node), (yyvsp[(5) - (6)].node), (yylsp[(2) - (6)])); + if ((yyvsp[-3].ival) == ANY_SUBLINK) + (yyval.node) = (Node *) makeA_Expr(AEXPR_OP_ANY, (yyvsp[-4].list), (yyvsp[-5].node), (yyvsp[-1].node), (yylsp[-4])); else - (yyval.node) = (Node *) makeA_Expr(AEXPR_OP_ALL, (yyvsp[(2) - (6)].list), (yyvsp[(1) - (6)].node), (yyvsp[(5) - (6)].node), (yylsp[(2) - (6)])); + (yyval.node) = (Node *) makeA_Expr(AEXPR_OP_ALL, (yyvsp[-4].list), (yyvsp[-5].node), (yyvsp[-1].node), (yylsp[-4])); } break; @@ -23414,7 +23191,7 @@ yyreduce: case 1207: #line 7701 "gram.y" { - (yyval.node) = makeXmlExpr(IS_DOCUMENT, NULL, NIL, list_make1((yyvsp[(1) - (3)].node))); + (yyval.node) = makeXmlExpr(IS_DOCUMENT, NULL, NIL, list_make1((yyvsp[-2].node))); } break; @@ -23422,95 +23199,95 @@ yyreduce: #line 7705 "gram.y" { (yyval.node) = (Node *) makeA_Expr(AEXPR_NOT, NIL, NULL, - makeXmlExpr(IS_DOCUMENT, NULL, NIL, list_make1((yyvsp[(1) - (4)].node))), - (yylsp[(2) - (4)])); + makeXmlExpr(IS_DOCUMENT, NULL, NIL, list_make1((yyvsp[-3].node))), + (yylsp[-2])); } break; case 1209: #line 7722 "gram.y" - { (yyval.node) = (yyvsp[(1) - (1)].node); } + { (yyval.node) = (yyvsp[0].node); } break; case 1210: #line 7724 "gram.y" - { (yyval.node) = makeTypeCast((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].typnam)); } + { (yyval.node) = makeTypeCast((yyvsp[-2].node), (yyvsp[0].typnam)); } break; case 1211: #line 7726 "gram.y" - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "+", NULL, (yyvsp[(2) - (2)].node), (yylsp[(1) - (2)])); } + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "+", NULL, (yyvsp[0].node), (yylsp[-1])); } break; case 1212: #line 7728 "gram.y" - { (yyval.node) = doNegate((yyvsp[(2) - (2)].node), (yylsp[(1) - (2)])); } + { (yyval.node) = doNegate((yyvsp[0].node), (yylsp[-1])); } break; case 1213: #line 7730 "gram.y" - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "+", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); } + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "+", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } break; case 1214: #line 7732 "gram.y" - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "-", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); } + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "-", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } break; case 1215: #line 7734 "gram.y" - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "*", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); } + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "*", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } break; case 1216: #line 7736 "gram.y" - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "/", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); } + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "/", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } break; case 1217: #line 7738 "gram.y" - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "%", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); } + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "%", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } break; case 1218: #line 7740 "gram.y" - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "^", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); } + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "^", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } break; case 1219: #line 7742 "gram.y" - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "<", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); } + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "<", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } break; case 1220: #line 7744 "gram.y" - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, ">", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); } + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, ">", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } break; case 1221: #line 7746 "gram.y" - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "=", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); } + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "=", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } break; case 1222: #line 7748 "gram.y" - { (yyval.node) = (Node *) makeA_Expr(AEXPR_OP, (yyvsp[(2) - (3)].list), (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); } + { (yyval.node) = (Node *) makeA_Expr(AEXPR_OP, (yyvsp[-1].list), (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } break; case 1223: #line 7750 "gram.y" - { (yyval.node) = (Node *) makeA_Expr(AEXPR_OP, (yyvsp[(1) - (2)].list), NULL, (yyvsp[(2) - (2)].node), (yylsp[(1) - (2)])); } + { (yyval.node) = (Node *) makeA_Expr(AEXPR_OP, (yyvsp[-1].list), NULL, (yyvsp[0].node), (yylsp[-1])); } break; case 1224: #line 7752 "gram.y" - { (yyval.node) = (Node *) makeA_Expr(AEXPR_OP, (yyvsp[(2) - (2)].list), (yyvsp[(1) - (2)].node), NULL, (yylsp[(2) - (2)])); } + { (yyval.node) = (Node *) makeA_Expr(AEXPR_OP, (yyvsp[0].list), (yyvsp[-1].node), NULL, (yylsp[0])); } break; case 1225: #line 7754 "gram.y" { - (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_DISTINCT, "=", (yyvsp[(1) - (5)].node), (yyvsp[(5) - (5)].node), (yylsp[(2) - (5)])); + (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_DISTINCT, "=", (yyvsp[-4].node), (yyvsp[0].node), (yylsp[-3])); } break; @@ -23518,28 +23295,28 @@ yyreduce: #line 7758 "gram.y" { (yyval.node) = (Node *) makeA_Expr(AEXPR_NOT, NIL, - NULL, (Node *) makeSimpleA_Expr(AEXPR_DISTINCT, "=", (yyvsp[(1) - (6)].node), (yyvsp[(6) - (6)].node), (yylsp[(2) - (6)])), (yylsp[(2) - (6)])); + NULL, (Node *) makeSimpleA_Expr(AEXPR_DISTINCT, "=", (yyvsp[-5].node), (yyvsp[0].node), (yylsp[-4])), (yylsp[-4])); } break; case 1227: #line 7763 "gram.y" { - (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OF, "=", (yyvsp[(1) - (6)].node), (Node *) (yyvsp[(5) - (6)].list), (yylsp[(2) - (6)])); + (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OF, "=", (yyvsp[-5].node), (Node *) (yyvsp[-1].list), (yylsp[-4])); } break; case 1228: #line 7767 "gram.y" { - (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OF, "<>", (yyvsp[(1) - (7)].node), (Node *) (yyvsp[(6) - (7)].list), (yylsp[(2) - (7)])); + (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OF, "<>", (yyvsp[-6].node), (Node *) (yyvsp[-1].list), (yylsp[-5])); } break; case 1229: #line 7771 "gram.y" { - (yyval.node) = makeXmlExpr(IS_DOCUMENT, NULL, NIL, list_make1((yyvsp[(1) - (3)].node))); + (yyval.node) = makeXmlExpr(IS_DOCUMENT, NULL, NIL, list_make1((yyvsp[-2].node))); } break; @@ -23547,31 +23324,31 @@ yyreduce: #line 7775 "gram.y" { (yyval.node) = (Node *) makeA_Expr(AEXPR_NOT, NIL, NULL, - makeXmlExpr(IS_DOCUMENT, NULL, NIL, list_make1((yyvsp[(1) - (4)].node))), - (yylsp[(2) - (4)])); + makeXmlExpr(IS_DOCUMENT, NULL, NIL, list_make1((yyvsp[-3].node))), + (yylsp[-2])); } break; case 1231: #line 7790 "gram.y" - { (yyval.node) = (yyvsp[(1) - (1)].node); } + { (yyval.node) = (yyvsp[0].node); } break; case 1232: #line 7791 "gram.y" - { (yyval.node) = (yyvsp[(1) - (1)].node); } + { (yyval.node) = (yyvsp[0].node); } break; case 1233: #line 7793 "gram.y" { ParamRef *p = makeNode(ParamRef); - p->number = (yyvsp[(1) - (2)].ival); - if ((yyvsp[(2) - (2)].list)) + p->number = (yyvsp[-1].ival); + if ((yyvsp[0].list)) { A_Indirection *n = makeNode(A_Indirection); n->arg = (Node *) p; - n->indirection = (yyvsp[(2) - (2)].list); + n->indirection = (yyvsp[0].list); (yyval.node) = (Node *) n; } else @@ -23582,26 +23359,26 @@ yyreduce: case 1234: #line 7807 "gram.y" { - if ((yyvsp[(4) - (4)].list)) + if ((yyvsp[0].list)) { A_Indirection *n = makeNode(A_Indirection); - n->arg = (yyvsp[(2) - (4)].node); - n->indirection = (yyvsp[(4) - (4)].list); + n->arg = (yyvsp[-2].node); + n->indirection = (yyvsp[0].list); (yyval.node) = (Node *)n; } else - (yyval.node) = (yyvsp[(2) - (4)].node); + (yyval.node) = (yyvsp[-2].node); } break; case 1235: #line 7819 "gram.y" - { (yyval.node) = (yyvsp[(1) - (1)].node); } + { (yyval.node) = (yyvsp[0].node); } break; case 1236: #line 7821 "gram.y" - { (yyval.node) = (yyvsp[(1) - (1)].node); } + { (yyval.node) = (yyvsp[0].node); } break; case 1237: @@ -23611,7 +23388,7 @@ yyreduce: n->subLinkType = EXPR_SUBLINK; n->testexpr = NULL; n->operName = NIL; - n->subselect = (yyvsp[(1) - (1)].node); + n->subselect = (yyvsp[0].node); (yyval.node) = (Node *)n; } break; @@ -23623,7 +23400,7 @@ yyreduce: n->subLinkType = EXISTS_SUBLINK; n->testexpr = NULL; n->operName = NIL; - n->subselect = (yyvsp[(2) - (2)].node); + n->subselect = (yyvsp[0].node); (yyval.node) = (Node *)n; } break; @@ -23635,21 +23412,21 @@ yyreduce: n->subLinkType = ARRAY_SUBLINK; n->testexpr = NULL; n->operName = NIL; - n->subselect = (yyvsp[(2) - (2)].node); + n->subselect = (yyvsp[0].node); (yyval.node) = (Node *)n; } break; case 1240: #line 7850 "gram.y" - { (yyval.node) = (yyvsp[(2) - (2)].node); } + { (yyval.node) = (yyvsp[0].node); } break; case 1241: #line 7852 "gram.y" { RowExpr *r = makeNode(RowExpr); - r->args = (yyvsp[(1) - (1)].list); + r->args = (yyvsp[0].list); r->row_typeid = 0; /* not analyzed yet */ (yyval.node) = (Node *)r; } @@ -23659,11 +23436,11 @@ yyreduce: #line 7869 "gram.y" { FuncCall *n = makeNode(FuncCall); - n->funcname = (yyvsp[(1) - (3)].list); + n->funcname = (yyvsp[-2].list); n->args = NIL; n->agg_star = FALSE; n->agg_distinct = FALSE; - n->location = (yylsp[(1) - (3)]); + n->location = (yylsp[-2]); (yyval.node) = (Node *)n; } break; @@ -23672,11 +23449,11 @@ yyreduce: #line 7879 "gram.y" { FuncCall *n = makeNode(FuncCall); - n->funcname = (yyvsp[(1) - (4)].list); - n->args = (yyvsp[(3) - (4)].list); + n->funcname = (yyvsp[-3].list); + n->args = (yyvsp[-1].list); n->agg_star = FALSE; n->agg_distinct = FALSE; - n->location = (yylsp[(1) - (4)]); + n->location = (yylsp[-3]); (yyval.node) = (Node *)n; } break; @@ -23685,15 +23462,15 @@ yyreduce: #line 7889 "gram.y" { FuncCall *n = makeNode(FuncCall); - n->funcname = (yyvsp[(1) - (5)].list); - n->args = (yyvsp[(4) - (5)].list); + n->funcname = (yyvsp[-4].list); + n->args = (yyvsp[-1].list); n->agg_star = FALSE; n->agg_distinct = FALSE; /* Ideally we'd mark the FuncCall node to indicate * "must be an aggregate", but there's no provision * for that in FuncCall at the moment. */ - n->location = (yylsp[(1) - (5)]); + n->location = (yylsp[-4]); (yyval.node) = (Node *)n; } break; @@ -23702,11 +23479,11 @@ yyreduce: #line 7903 "gram.y" { FuncCall *n = makeNode(FuncCall); - n->funcname = (yyvsp[(1) - (5)].list); - n->args = (yyvsp[(4) - (5)].list); + n->funcname = (yyvsp[-4].list); + n->args = (yyvsp[-1].list); n->agg_star = FALSE; n->agg_distinct = TRUE; - n->location = (yylsp[(1) - (5)]); + n->location = (yylsp[-4]); (yyval.node) = (Node *)n; } break; @@ -23725,11 +23502,11 @@ yyreduce: * really was. */ FuncCall *n = makeNode(FuncCall); - n->funcname = (yyvsp[(1) - (4)].list); + n->funcname = (yyvsp[-3].list); n->args = NIL; n->agg_star = TRUE; n->agg_distinct = FALSE; - n->location = (yylsp[(1) - (4)]); + n->location = (yylsp[-3]); (yyval.node) = (Node *)n; } break; @@ -23799,7 +23576,7 @@ yyreduce: s->val.val.str = "now"; s->typename = SystemTypeName("text"); d = SystemTypeName("timetz"); - d->typmods = list_make1(makeIntConst((yyvsp[(3) - (4)].ival))); + d->typmods = list_make1(makeIntConst((yyvsp[-1].ival))); (yyval.node) = (Node *)makeTypeCast((Node *)s, d); } @@ -23817,7 +23594,7 @@ yyreduce: n->args = NIL; n->agg_star = FALSE; n->agg_distinct = FALSE; - n->location = (yylsp[(1) - (1)]); + n->location = (yylsp[0]); (yyval.node) = (Node *)n; } break; @@ -23837,7 +23614,7 @@ yyreduce: s->typename = SystemTypeName("text"); d = SystemTypeName("timestamptz"); - d->typmods = list_make1(makeIntConst((yyvsp[(3) - (4)].ival))); + d->typmods = list_make1(makeIntConst((yyvsp[-1].ival))); (yyval.node) = (Node *)makeTypeCast((Node *)s, d); } @@ -23877,7 +23654,7 @@ yyreduce: s->val.val.str = "now"; s->typename = SystemTypeName("text"); d = SystemTypeName("time"); - d->typmods = list_make1(makeIntConst((yyvsp[(3) - (4)].ival))); + d->typmods = list_make1(makeIntConst((yyvsp[-1].ival))); (yyval.node) = (Node *)makeTypeCast((Node *)s, d); } @@ -23918,7 +23695,7 @@ yyreduce: s->typename = SystemTypeName("text"); d = SystemTypeName("timestamp"); - d->typmods = list_make1(makeIntConst((yyvsp[(3) - (4)].ival))); + d->typmods = list_make1(makeIntConst((yyvsp[-1].ival))); (yyval.node) = (Node *)makeTypeCast((Node *)s, d); } @@ -23932,7 +23709,7 @@ yyreduce: n->args = NIL; n->agg_star = FALSE; n->agg_distinct = FALSE; - n->location = (yylsp[(1) - (1)]); + n->location = (yylsp[0]); (yyval.node) = (Node *)n; } break; @@ -23945,7 +23722,7 @@ yyreduce: n->args = NIL; n->agg_star = FALSE; n->agg_distinct = FALSE; - n->location = (yylsp[(1) - (1)]); + n->location = (yylsp[0]); (yyval.node) = (Node *)n; } break; @@ -23958,7 +23735,7 @@ yyreduce: n->args = NIL; n->agg_star = FALSE; n->agg_distinct = FALSE; - n->location = (yylsp[(1) - (1)]); + n->location = (yylsp[0]); (yyval.node) = (Node *)n; } break; @@ -23971,14 +23748,14 @@ yyreduce: n->args = NIL; n->agg_star = FALSE; n->agg_distinct = FALSE; - n->location = (yylsp[(1) - (1)]); + n->location = (yylsp[0]); (yyval.node) = (Node *)n; } break; case 1260: #line 8136 "gram.y" - { (yyval.node) = makeTypeCast((yyvsp[(3) - (6)].node), (yyvsp[(5) - (6)].typnam)); } + { (yyval.node) = makeTypeCast((yyvsp[-3].node), (yyvsp[-1].typnam)); } break; case 1261: @@ -23986,10 +23763,10 @@ yyreduce: { FuncCall *n = makeNode(FuncCall); n->funcname = SystemFuncName("date_part"); - n->args = (yyvsp[(3) - (4)].list); + n->args = (yyvsp[-1].list); n->agg_star = FALSE; n->agg_distinct = FALSE; - n->location = (yylsp[(1) - (4)]); + n->location = (yylsp[-3]); (yyval.node) = (Node *)n; } break; @@ -24004,10 +23781,10 @@ yyreduce: */ FuncCall *n = makeNode(FuncCall); n->funcname = SystemFuncName("overlay"); - n->args = (yyvsp[(3) - (4)].list); + n->args = (yyvsp[-1].list); n->agg_star = FALSE; n->agg_distinct = FALSE; - n->location = (yylsp[(1) - (4)]); + n->location = (yylsp[-3]); (yyval.node) = (Node *)n; } break; @@ -24018,10 +23795,10 @@ yyreduce: /* position(A in B) is converted to position(B, A) */ FuncCall *n = makeNode(FuncCall); n->funcname = SystemFuncName("position"); - n->args = (yyvsp[(3) - (4)].list); + n->args = (yyvsp[-1].list); n->agg_star = FALSE; n->agg_distinct = FALSE; - n->location = (yylsp[(1) - (4)]); + n->location = (yylsp[-3]); (yyval.node) = (Node *)n; } break; @@ -24034,10 +23811,10 @@ yyreduce: */ FuncCall *n = makeNode(FuncCall); n->funcname = SystemFuncName("substring"); - n->args = (yyvsp[(3) - (4)].list); + n->args = (yyvsp[-1].list); n->agg_star = FALSE; n->agg_distinct = FALSE; - n->location = (yylsp[(1) - (4)]); + n->location = (yylsp[-3]); (yyval.node) = (Node *)n; } break; @@ -24055,11 +23832,11 @@ yyreduce: /* Convert SystemTypeName() to SystemFuncName() even though * at the moment they result in the same thing. */ - n->funcname = SystemFuncName(((Value *)llast((yyvsp[(5) - (6)].typnam)->names))->val.str); - n->args = list_make1((yyvsp[(3) - (6)].node)); + n->funcname = SystemFuncName(((Value *)llast((yyvsp[-1].typnam)->names))->val.str); + n->args = list_make1((yyvsp[-3].node)); n->agg_star = FALSE; n->agg_distinct = FALSE; - n->location = (yylsp[(1) - (6)]); + n->location = (yylsp[-5]); (yyval.node) = (Node *)n; } break; @@ -24072,10 +23849,10 @@ yyreduce: */ FuncCall *n = makeNode(FuncCall); n->funcname = SystemFuncName("btrim"); - n->args = (yyvsp[(4) - (5)].list); + n->args = (yyvsp[-1].list); n->agg_star = FALSE; n->agg_distinct = FALSE; - n->location = (yylsp[(1) - (5)]); + n->location = (yylsp[-4]); (yyval.node) = (Node *)n; } break; @@ -24085,10 +23862,10 @@ yyreduce: { FuncCall *n = makeNode(FuncCall); n->funcname = SystemFuncName("ltrim"); - n->args = (yyvsp[(4) - (5)].list); + n->args = (yyvsp[-1].list); n->agg_star = FALSE; n->agg_distinct = FALSE; - n->location = (yylsp[(1) - (5)]); + n->location = (yylsp[-4]); (yyval.node) = (Node *)n; } break; @@ -24098,10 +23875,10 @@ yyreduce: { FuncCall *n = makeNode(FuncCall); n->funcname = SystemFuncName("rtrim"); - n->args = (yyvsp[(4) - (5)].list); + n->args = (yyvsp[-1].list); n->agg_star = FALSE; n->agg_distinct = FALSE; - n->location = (yylsp[(1) - (5)]); + n->location = (yylsp[-4]); (yyval.node) = (Node *)n; } break; @@ -24111,10 +23888,10 @@ yyreduce: { FuncCall *n = makeNode(FuncCall); n->funcname = SystemFuncName("btrim"); - n->args = (yyvsp[(3) - (4)].list); + n->args = (yyvsp[-1].list); n->agg_star = FALSE; n->agg_distinct = FALSE; - n->location = (yylsp[(1) - (4)]); + n->location = (yylsp[-3]); (yyval.node) = (Node *)n; } break; @@ -24122,7 +23899,7 @@ yyreduce: case 1270: #line 8249 "gram.y" { - (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_NULLIF, "=", (yyvsp[(3) - (6)].node), (yyvsp[(5) - (6)].node), (yylsp[(1) - (6)])); + (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_NULLIF, "=", (yyvsp[-3].node), (yyvsp[-1].node), (yylsp[-5])); } break; @@ -24130,7 +23907,7 @@ yyreduce: #line 8253 "gram.y" { CoalesceExpr *c = makeNode(CoalesceExpr); - c->args = (yyvsp[(3) - (4)].list); + c->args = (yyvsp[-1].list); (yyval.node) = (Node *)c; } break; @@ -24139,7 +23916,7 @@ yyreduce: #line 8259 "gram.y" { MinMaxExpr *v = makeNode(MinMaxExpr); - v->args = (yyvsp[(3) - (4)].list); + v->args = (yyvsp[-1].list); v->op = IS_GREATEST; (yyval.node) = (Node *)v; } @@ -24149,7 +23926,7 @@ yyreduce: #line 8266 "gram.y" { MinMaxExpr *v = makeNode(MinMaxExpr); - v->args = (yyvsp[(3) - (4)].list); + v->args = (yyvsp[-1].list); v->op = IS_LEAST; (yyval.node) = (Node *)v; } @@ -24158,42 +23935,42 @@ yyreduce: case 1274: #line 8273 "gram.y" { - (yyval.node) = makeXmlExpr(IS_XMLCONCAT, NULL, NIL, (yyvsp[(3) - (4)].list)); + (yyval.node) = makeXmlExpr(IS_XMLCONCAT, NULL, NIL, (yyvsp[-1].list)); } break; case 1275: #line 8277 "gram.y" { - (yyval.node) = makeXmlExpr(IS_XMLELEMENT, (yyvsp[(4) - (5)].str), NIL, NIL); + (yyval.node) = makeXmlExpr(IS_XMLELEMENT, (yyvsp[-1].str), NIL, NIL); } break; case 1276: #line 8281 "gram.y" { - (yyval.node) = makeXmlExpr(IS_XMLELEMENT, (yyvsp[(4) - (7)].str), (yyvsp[(6) - (7)].list), NIL); + (yyval.node) = makeXmlExpr(IS_XMLELEMENT, (yyvsp[-3].str), (yyvsp[-1].list), NIL); } break; case 1277: #line 8285 "gram.y" { - (yyval.node) = makeXmlExpr(IS_XMLELEMENT, (yyvsp[(4) - (7)].str), NIL, (yyvsp[(6) - (7)].list)); + (yyval.node) = makeXmlExpr(IS_XMLELEMENT, (yyvsp[-3].str), NIL, (yyvsp[-1].list)); } break; case 1278: #line 8289 "gram.y" { - (yyval.node) = makeXmlExpr(IS_XMLELEMENT, (yyvsp[(4) - (9)].str), (yyvsp[(6) - (9)].list), (yyvsp[(8) - (9)].list)); + (yyval.node) = makeXmlExpr(IS_XMLELEMENT, (yyvsp[-5].str), (yyvsp[-3].list), (yyvsp[-1].list)); } break; case 1279: #line 8293 "gram.y" { - (yyval.node) = makeXmlExpr(IS_XMLFOREST, NULL, (yyvsp[(3) - (4)].list), NIL); + (yyval.node) = makeXmlExpr(IS_XMLFOREST, NULL, (yyvsp[-1].list), NIL); } break; @@ -24201,9 +23978,9 @@ yyreduce: #line 8297 "gram.y" { XmlExpr *x = (XmlExpr *) makeXmlExpr(IS_XMLPARSE, NULL, NIL, - list_make2((yyvsp[(4) - (6)].node), - makeBoolAConst((yyvsp[(5) - (6)].boolean)))); - x->xmloption = (yyvsp[(3) - (6)].ival); + list_make2((yyvsp[-2].node), + makeBoolAConst((yyvsp[-1].boolean)))); + x->xmloption = (yyvsp[-3].ival); (yyval.node) = (Node *)x; } break; @@ -24211,14 +23988,14 @@ yyreduce: case 1281: #line 8305 "gram.y" { - (yyval.node) = makeXmlExpr(IS_XMLPI, (yyvsp[(4) - (5)].str), NULL, NIL); + (yyval.node) = makeXmlExpr(IS_XMLPI, (yyvsp[-1].str), NULL, NIL); } break; case 1282: #line 8309 "gram.y" { - (yyval.node) = makeXmlExpr(IS_XMLPI, (yyvsp[(4) - (7)].str), NULL, list_make1((yyvsp[(6) - (7)].node))); + (yyval.node) = makeXmlExpr(IS_XMLPI, (yyvsp[-3].str), NULL, list_make1((yyvsp[-1].node))); } break; @@ -24226,7 +24003,7 @@ yyreduce: #line 8313 "gram.y" { (yyval.node) = makeXmlExpr(IS_XMLROOT, NULL, NIL, - list_make3((yyvsp[(3) - (7)].node), (yyvsp[(5) - (7)].node), (yyvsp[(6) - (7)].node))); + list_make3((yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node))); } break; @@ -24234,16 +24011,16 @@ yyreduce: #line 8318 "gram.y" { XmlSerialize *n = makeNode(XmlSerialize); - n->xmloption = (yyvsp[(3) - (7)].ival); - n->expr = (yyvsp[(4) - (7)].node); - n->typename = (yyvsp[(6) - (7)].typnam); + n->xmloption = (yyvsp[-4].ival); + n->expr = (yyvsp[-3].node); + n->typename = (yyvsp[-1].typnam); (yyval.node) = (Node *)n; } break; case 1285: #line 8331 "gram.y" - { (yyval.node) = (yyvsp[(2) - (2)].node); } + { (yyval.node) = (yyvsp[0].node); } break; case 1286: @@ -24277,27 +24054,27 @@ yyreduce: case 1291: #line 8350 "gram.y" - { (yyval.list) = (yyvsp[(3) - (4)].list); } + { (yyval.list) = (yyvsp[-1].list); } break; case 1292: #line 8353 "gram.y" - { (yyval.list) = list_make1((yyvsp[(1) - (1)].target)); } + { (yyval.list) = list_make1((yyvsp[0].target)); } break; case 1293: #line 8354 "gram.y" - { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].target)); } + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].target)); } break; case 1294: #line 8358 "gram.y" { (yyval.target) = makeNode(ResTarget); - (yyval.target)->name = (yyvsp[(3) - (3)].str); + (yyval.target)->name = (yyvsp[0].str); (yyval.target)->indirection = NULL; - (yyval.target)->val = (Node *) (yyvsp[(1) - (3)].node); - (yyval.target)->location = (yylsp[(1) - (3)]); + (yyval.target)->val = (Node *) (yyvsp[-2].node); + (yyval.target)->location = (yylsp[-2]); } break; @@ -24307,8 +24084,8 @@ yyreduce: (yyval.target) = makeNode(ResTarget); (yyval.target)->name = NULL; (yyval.target)->indirection = NULL; - (yyval.target)->val = (Node *) (yyvsp[(1) - (1)].node); - (yyval.target)->location = (yylsp[(1) - (1)]); + (yyval.target)->val = (Node *) (yyvsp[0].node); + (yyval.target)->location = (yylsp[0]); } break; @@ -24339,7 +24116,7 @@ yyreduce: case 1301: #line 8394 "gram.y" - { (yyval.list) = (yyvsp[(3) - (4)].list); } + { (yyval.list) = (yyvsp[-1].list); } break; case 1302: @@ -24349,7 +24126,7 @@ yyreduce: case 1303: #line 8396 "gram.y" - { (yyval.list) = lappend((yyvsp[(2) - (5)].list), (yyvsp[(4) - (5)].node)); } + { (yyval.list) = lappend((yyvsp[-3].list), (yyvsp[-1].node)); } break; case 1304: @@ -24369,12 +24146,12 @@ yyreduce: case 1307: #line 8404 "gram.y" - { (yyval.str) = (yyvsp[(1) - (1)].str); } + { (yyval.str) = (yyvsp[0].str); } break; case 1308: #line 8405 "gram.y" - { (yyval.str) = (yyvsp[(1) - (1)].str); } + { (yyval.str) = (yyvsp[0].str); } break; case 1309: @@ -24424,32 +24201,32 @@ yyreduce: case 1318: #line 8420 "gram.y" - { (yyval.list) = list_make1(makeString((yyvsp[(1) - (1)].str))); } + { (yyval.list) = list_make1(makeString((yyvsp[0].str))); } break; case 1319: #line 8422 "gram.y" - { (yyval.list) = (yyvsp[(3) - (4)].list); } + { (yyval.list) = (yyvsp[-1].list); } break; case 1320: #line 8427 "gram.y" - { (yyval.list) = list_make1(makeString((yyvsp[(1) - (1)].str))); } + { (yyval.list) = list_make1(makeString((yyvsp[0].str))); } break; case 1321: #line 8429 "gram.y" - { (yyval.list) = (yyvsp[(3) - (4)].list); } + { (yyval.list) = (yyvsp[-1].list); } break; case 1322: #line 8434 "gram.y" - { (yyval.list) = list_make1(makeString((yyvsp[(1) - (1)].str))); } + { (yyval.list) = list_make1(makeString((yyvsp[0].str))); } break; case 1323: #line 8436 "gram.y" - { (yyval.list) = (yyvsp[(3) - (4)].list); } + { (yyval.list) = (yyvsp[-1].list); } break; case 1324: @@ -24475,14 +24252,14 @@ yyreduce: case 1328: #line 8456 "gram.y" { - (yyval.list) = list_make1((yyvsp[(1) - (1)].node)); + (yyval.list) = list_make1((yyvsp[0].node)); } break; case 1329: #line 8460 "gram.y" { - (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); + (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].node)); } break; @@ -24491,8 +24268,8 @@ yyreduce: { A_Const *n = makeNode(A_Const); n->val.type = T_String; - n->val.val.str = (yyvsp[(1) - (3)].str); - (yyval.list) = list_make2((Node *) n, (yyvsp[(3) - (3)].node)); + n->val.val.str = (yyvsp[-2].str); + (yyval.list) = list_make2((Node *) n, (yyvsp[0].node)); } break; @@ -24503,29 +24280,29 @@ yyreduce: case 1332: #line 8476 "gram.y" - { (yyval.list) = list_make1((yyvsp[(1) - (1)].typnam)); } + { (yyval.list) = list_make1((yyvsp[0].typnam)); } break; case 1333: #line 8477 "gram.y" - { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].typnam)); } + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].typnam)); } break; case 1334: #line 8481 "gram.y" - { (yyval.list) = list_make1((yyvsp[(1) - (1)].node)); } + { (yyval.list) = list_make1((yyvsp[0].node)); } break; case 1335: #line 8483 "gram.y" - { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); } + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].node)); } break; case 1336: #line 8487 "gram.y" { ArrayExpr *n = makeNode(ArrayExpr); - n->elements = (yyvsp[(2) - (3)].list); + n->elements = (yyvsp[-1].list); (yyval.node) = (Node *)n; } break; @@ -24534,14 +24311,14 @@ yyreduce: #line 8493 "gram.y" { ArrayExpr *n = makeNode(ArrayExpr); - n->elements = (yyvsp[(2) - (3)].list); + n->elements = (yyvsp[-1].list); (yyval.node) = (Node *)n; } break; case 1338: #line 8505 "gram.y" - { (yyval.str) = (yyvsp[(1) - (1)].str); } + { (yyval.str) = (yyvsp[0].str); } break; case 1339: @@ -24576,31 +24353,31 @@ yyreduce: case 1345: #line 8512 "gram.y" - { (yyval.str) = (yyvsp[(1) - (1)].str); } + { (yyval.str) = (yyvsp[0].str); } break; case 1346: #line 8522 "gram.y" { - (yyval.list) = list_make4((yyvsp[(1) - (4)].node), (yyvsp[(2) - (4)].node), (yyvsp[(3) - (4)].node), (yyvsp[(4) - (4)].node)); + (yyval.list) = list_make4((yyvsp[-3].node), (yyvsp[-2].node), (yyvsp[-1].node), (yyvsp[0].node)); } break; case 1347: #line 8526 "gram.y" { - (yyval.list) = list_make3((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].node), (yyvsp[(3) - (3)].node)); + (yyval.list) = list_make3((yyvsp[-2].node), (yyvsp[-1].node), (yyvsp[0].node)); } break; case 1348: #line 8533 "gram.y" - { (yyval.node) = (yyvsp[(2) - (2)].node); } + { (yyval.node) = (yyvsp[0].node); } break; case 1349: #line 8539 "gram.y" - { (yyval.list) = list_make2((yyvsp[(3) - (3)].node), (yyvsp[(1) - (3)].node)); } + { (yyval.list) = list_make2((yyvsp[0].node), (yyvsp[-2].node)); } break; case 1350: @@ -24611,7 +24388,7 @@ yyreduce: case 1351: #line 8557 "gram.y" { - (yyval.list) = list_make3((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].node), (yyvsp[(3) - (3)].node)); + (yyval.list) = list_make3((yyvsp[-2].node), (yyvsp[-1].node), (yyvsp[0].node)); } break; @@ -24619,14 +24396,14 @@ yyreduce: #line 8561 "gram.y" { /* not legal per SQL99, but might as well allow it */ - (yyval.list) = list_make3((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yyvsp[(2) - (3)].node)); + (yyval.list) = list_make3((yyvsp[-2].node), (yyvsp[0].node), (yyvsp[-1].node)); } break; case 1353: #line 8566 "gram.y" { - (yyval.list) = list_make2((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); + (yyval.list) = list_make2((yyvsp[-1].node), (yyvsp[0].node)); } break; @@ -24645,15 +24422,15 @@ yyreduce: A_Const *n = makeNode(A_Const); n->val.type = T_Integer; n->val.val.ival = 1; - (yyval.list) = list_make3((yyvsp[(1) - (2)].node), (Node *) n, - makeTypeCast((yyvsp[(2) - (2)].node), SystemTypeName("int4"))); + (yyval.list) = list_make3((yyvsp[-1].node), (Node *) n, + makeTypeCast((yyvsp[0].node), SystemTypeName("int4"))); } break; case 1355: #line 8587 "gram.y" { - (yyval.list) = (yyvsp[(1) - (1)].list); + (yyval.list) = (yyvsp[0].list); } break; @@ -24664,34 +24441,34 @@ yyreduce: case 1357: #line 8595 "gram.y" - { (yyval.node) = (yyvsp[(2) - (2)].node); } + { (yyval.node) = (yyvsp[0].node); } break; case 1358: #line 8598 "gram.y" - { (yyval.node) = (yyvsp[(2) - (2)].node); } + { (yyval.node) = (yyvsp[0].node); } break; case 1359: #line 8601 "gram.y" - { (yyval.list) = lappend((yyvsp[(3) - (3)].list), (yyvsp[(1) - (3)].node)); } + { (yyval.list) = lappend((yyvsp[0].list), (yyvsp[-2].node)); } break; case 1360: #line 8602 "gram.y" - { (yyval.list) = (yyvsp[(2) - (2)].list); } + { (yyval.list) = (yyvsp[0].list); } break; case 1361: #line 8603 "gram.y" - { (yyval.list) = (yyvsp[(1) - (1)].list); } + { (yyval.list) = (yyvsp[0].list); } break; case 1362: #line 8607 "gram.y" { SubLink *n = makeNode(SubLink); - n->subselect = (yyvsp[(1) - (1)].node); + n->subselect = (yyvsp[0].node); /* other fields will be filled later */ (yyval.node) = (Node *)n; } @@ -24699,7 +24476,7 @@ yyreduce: case 1363: #line 8613 "gram.y" - { (yyval.node) = (Node *)(yyvsp[(2) - (3)].list); } + { (yyval.node) = (Node *)(yyvsp[-1].list); } break; case 1364: @@ -24707,36 +24484,36 @@ yyreduce: { CaseExpr *c = makeNode(CaseExpr); c->casetype = 0; /* not analyzed yet */ - c->arg = (Expr *) (yyvsp[(2) - (5)].node); - c->args = (yyvsp[(3) - (5)].list); - c->defresult = (Expr *) (yyvsp[(4) - (5)].node); + c->arg = (Expr *) (yyvsp[-3].node); + c->args = (yyvsp[-2].list); + c->defresult = (Expr *) (yyvsp[-1].node); (yyval.node) = (Node *)c; } break; case 1365: #line 8636 "gram.y" - { (yyval.list) = list_make1((yyvsp[(1) - (1)].node)); } + { (yyval.list) = list_make1((yyvsp[0].node)); } break; case 1366: #line 8637 "gram.y" - { (yyval.list) = lappend((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].node)); } + { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].node)); } break; case 1367: #line 8642 "gram.y" { CaseWhen *w = makeNode(CaseWhen); - w->expr = (Expr *) (yyvsp[(2) - (4)].node); - w->result = (Expr *) (yyvsp[(4) - (4)].node); + w->expr = (Expr *) (yyvsp[-2].node); + w->result = (Expr *) (yyvsp[0].node); (yyval.node) = (Node *)w; } break; case 1368: #line 8651 "gram.y" - { (yyval.node) = (yyvsp[(2) - (2)].node); } + { (yyval.node) = (yyvsp[0].node); } break; case 1369: @@ -24746,7 +24523,7 @@ yyreduce: case 1370: #line 8655 "gram.y" - { (yyval.node) = (yyvsp[(1) - (1)].node); } + { (yyval.node) = (yyvsp[0].node); } break; case 1371: @@ -24757,21 +24534,21 @@ yyreduce: case 1372: #line 8665 "gram.y" { - (yyval.node) = makeColumnRef((yyvsp[(1) - (1)].str), NIL, (yylsp[(1) - (1)])); + (yyval.node) = makeColumnRef((yyvsp[0].str), NIL, (yylsp[0])); } break; case 1373: #line 8669 "gram.y" { - (yyval.node) = makeColumnRef((yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].list), (yylsp[(1) - (2)])); + (yyval.node) = makeColumnRef((yyvsp[-1].str), (yyvsp[0].list), (yylsp[-1])); } break; case 1374: #line 8676 "gram.y" { - (yyval.node) = (Node *) makeString((yyvsp[(2) - (2)].str)); + (yyval.node) = (Node *) makeString((yyvsp[0].str)); } break; @@ -24787,7 +24564,7 @@ yyreduce: { A_Indices *ai = makeNode(A_Indices); ai->lidx = NULL; - ai->uidx = (yyvsp[(2) - (3)].node); + ai->uidx = (yyvsp[-1].node); (yyval.node) = (Node *) ai; } break; @@ -24796,20 +24573,20 @@ yyreduce: #line 8691 "gram.y" { A_Indices *ai = makeNode(A_Indices); - ai->lidx = (yyvsp[(2) - (5)].node); - ai->uidx = (yyvsp[(4) - (5)].node); + ai->lidx = (yyvsp[-3].node); + ai->uidx = (yyvsp[-1].node); (yyval.node) = (Node *) ai; } break; case 1378: #line 8700 "gram.y" - { (yyval.list) = list_make1((yyvsp[(1) - (1)].node)); } + { (yyval.list) = list_make1((yyvsp[0].node)); } break; case 1379: #line 8701 "gram.y" - { (yyval.list) = lappend((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].node)); } + { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].node)); } break; case 1380: @@ -24819,12 +24596,12 @@ yyreduce: case 1381: #line 8706 "gram.y" - { (yyval.list) = lappend((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].node)); } + { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].node)); } break; case 1384: #line 8721 "gram.y" - { (yyval.node) = (Node *) (yyvsp[(1) - (1)].node); } + { (yyval.node) = (Node *) (yyvsp[0].node); } break; case 1385: @@ -24834,37 +24611,37 @@ yyreduce: case 1386: #line 8726 "gram.y" - { (yyval.list) = list_make1((yyvsp[(1) - (1)].node)); } + { (yyval.list) = list_make1((yyvsp[0].node)); } break; case 1387: #line 8727 "gram.y" - { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); } + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].node)); } break; case 1388: #line 8735 "gram.y" - { (yyval.list) = (yyvsp[(2) - (3)].list); } + { (yyval.list) = (yyvsp[-1].list); } break; case 1389: #line 8746 "gram.y" - { (yyval.list) = list_make1((yyvsp[(1) - (1)].target)); } + { (yyval.list) = list_make1((yyvsp[0].target)); } break; case 1390: #line 8747 "gram.y" - { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].target)); } + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].target)); } break; case 1391: #line 8752 "gram.y" { (yyval.target) = makeNode(ResTarget); - (yyval.target)->name = (yyvsp[(3) - (3)].str); + (yyval.target)->name = (yyvsp[0].str); (yyval.target)->indirection = NIL; - (yyval.target)->val = (Node *)(yyvsp[(1) - (3)].node); - (yyval.target)->location = (yylsp[(1) - (3)]); + (yyval.target)->val = (Node *)(yyvsp[-2].node); + (yyval.target)->location = (yylsp[-2]); } break; @@ -24874,8 +24651,8 @@ yyreduce: (yyval.target) = makeNode(ResTarget); (yyval.target)->name = NULL; (yyval.target)->indirection = NIL; - (yyval.target)->val = (Node *)(yyvsp[(1) - (1)].node); - (yyval.target)->location = (yylsp[(1) - (1)]); + (yyval.target)->val = (Node *)(yyvsp[0].node); + (yyval.target)->location = (yylsp[0]); } break; @@ -24884,34 +24661,34 @@ yyreduce: { ColumnRef *n = makeNode(ColumnRef); n->fields = list_make1(makeString("*")); - n->location = (yylsp[(1) - (1)]); + n->location = (yylsp[0]); (yyval.target) = makeNode(ResTarget); (yyval.target)->name = NULL; (yyval.target)->indirection = NIL; (yyval.target)->val = (Node *)n; - (yyval.target)->location = (yylsp[(1) - (1)]); + (yyval.target)->location = (yylsp[0]); } break; case 1394: #line 8789 "gram.y" - { (yyval.str) = (yyvsp[(1) - (1)].str); } + { (yyval.str) = (yyvsp[0].str); } break; case 1395: #line 8790 "gram.y" - { (yyval.str) = (yyvsp[(1) - (1)].str); } + { (yyval.str) = (yyvsp[0].str); } break; case 1396: #line 8794 "gram.y" - { (yyval.list) = list_make1((yyvsp[(1) - (1)].range)); } + { (yyval.list) = list_make1((yyvsp[0].range)); } break; case 1397: #line 8795 "gram.y" - { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].range)); } + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].range)); } break; case 1398: @@ -24920,32 +24697,32 @@ yyreduce: (yyval.range) = makeNode(RangeVar); (yyval.range)->catalogname = NULL; (yyval.range)->schemaname = NULL; - (yyval.range)->relname = (yyvsp[(1) - (1)].str); + (yyval.range)->relname = (yyvsp[0].str); } break; case 1399: #line 8814 "gram.y" { - check_qualified_name((yyvsp[(2) - (2)].list)); + check_qualified_name((yyvsp[0].list)); (yyval.range) = makeNode(RangeVar); - switch (list_length((yyvsp[(2) - (2)].list))) + switch (list_length((yyvsp[0].list))) { case 1: (yyval.range)->catalogname = NULL; - (yyval.range)->schemaname = (yyvsp[(1) - (2)].str); - (yyval.range)->relname = strVal(linitial((yyvsp[(2) - (2)].list))); + (yyval.range)->schemaname = (yyvsp[-1].str); + (yyval.range)->relname = strVal(linitial((yyvsp[0].list))); break; case 2: - (yyval.range)->catalogname = (yyvsp[(1) - (2)].str); - (yyval.range)->schemaname = strVal(linitial((yyvsp[(2) - (2)].list))); - (yyval.range)->relname = strVal(lsecond((yyvsp[(2) - (2)].list))); + (yyval.range)->catalogname = (yyvsp[-1].str); + (yyval.range)->schemaname = strVal(linitial((yyvsp[0].list))); + (yyval.range)->relname = strVal(lsecond((yyvsp[0].list))); break; default: ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), errmsg("improper qualified name (too many dotted names): %s", - NameListToString(lcons(makeString((yyvsp[(1) - (2)].str)), (yyvsp[(2) - (2)].list)))))); + NameListToString(lcons(makeString((yyvsp[-1].str)), (yyvsp[0].list)))))); break; } } @@ -24953,52 +24730,52 @@ yyreduce: case 1400: #line 8840 "gram.y" - { (yyval.list) = list_make1(makeString((yyvsp[(1) - (1)].str))); } + { (yyval.list) = list_make1(makeString((yyvsp[0].str))); } break; case 1401: #line 8842 "gram.y" - { (yyval.list) = lappend((yyvsp[(1) - (3)].list), makeString((yyvsp[(3) - (3)].str))); } + { (yyval.list) = lappend((yyvsp[-2].list), makeString((yyvsp[0].str))); } break; case 1402: #line 8846 "gram.y" - { (yyval.str) = (yyvsp[(1) - (1)].str); } + { (yyval.str) = (yyvsp[0].str); } break; case 1403: #line 8849 "gram.y" - { (yyval.str) = (yyvsp[(1) - (1)].str); } + { (yyval.str) = (yyvsp[0].str); } break; case 1404: #line 8852 "gram.y" - { (yyval.str) = (yyvsp[(1) - (1)].str); } + { (yyval.str) = (yyvsp[0].str); } break; case 1405: #line 8854 "gram.y" - { (yyval.str) = (yyvsp[(1) - (1)].str); } + { (yyval.str) = (yyvsp[0].str); } break; case 1406: #line 8856 "gram.y" - { (yyval.str) = (yyvsp[(1) - (1)].str); } + { (yyval.str) = (yyvsp[0].str); } break; case 1407: #line 8858 "gram.y" - { (yyval.str) = (yyvsp[(1) - (1)].str); } + { (yyval.str) = (yyvsp[0].str); } break; case 1408: #line 8869 "gram.y" - { (yyval.list) = list_make1(makeString((yyvsp[(1) - (1)].str))); } + { (yyval.list) = list_make1(makeString((yyvsp[0].str))); } break; case 1409: #line 8871 "gram.y" - { (yyval.list) = check_func_name(lcons(makeString((yyvsp[(1) - (2)].str)), (yyvsp[(2) - (2)].list))); } + { (yyval.list) = check_func_name(lcons(makeString((yyvsp[-1].str)), (yyvsp[0].list))); } break; case 1410: @@ -25006,7 +24783,7 @@ yyreduce: { A_Const *n = makeNode(A_Const); n->val.type = T_Integer; - n->val.val.ival = (yyvsp[(1) - (1)].ival); + n->val.val.ival = (yyvsp[0].ival); (yyval.node) = (Node *)n; } break; @@ -25016,7 +24793,7 @@ yyreduce: { A_Const *n = makeNode(A_Const); n->val.type = T_Float; - n->val.val.str = (yyvsp[(1) - (1)].str); + n->val.val.str = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -25026,7 +24803,7 @@ yyreduce: { A_Const *n = makeNode(A_Const); n->val.type = T_String; - n->val.val.str = (yyvsp[(1) - (1)].str); + n->val.val.str = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -25036,7 +24813,7 @@ yyreduce: { A_Const *n = makeNode(A_Const); n->val.type = T_BitString; - n->val.val.str = (yyvsp[(1) - (1)].str); + n->val.val.str = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -25051,7 +24828,7 @@ yyreduce: */ A_Const *n = makeNode(A_Const); n->val.type = T_BitString; - n->val.val.str = (yyvsp[(1) - (1)].str); + n->val.val.str = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -25061,10 +24838,10 @@ yyreduce: { /* generic type 'literal' syntax */ A_Const *n = makeNode(A_Const); - n->typename = makeTypeNameFromNameList((yyvsp[(1) - (2)].list)); - n->typename->location = (yylsp[(1) - (2)]); + n->typename = makeTypeNameFromNameList((yyvsp[-1].list)); + n->typename->location = (yylsp[-1]); n->val.type = T_String; - n->val.val.str = (yyvsp[(2) - (2)].str); + n->val.val.str = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -25074,11 +24851,11 @@ yyreduce: { /* generic syntax with a type modifier */ A_Const *n = makeNode(A_Const); - n->typename = makeTypeNameFromNameList((yyvsp[(1) - (5)].list)); - n->typename->typmods = (yyvsp[(3) - (5)].list); - n->typename->location = (yylsp[(1) - (5)]); + n->typename = makeTypeNameFromNameList((yyvsp[-4].list)); + n->typename->typmods = (yyvsp[-2].list); + n->typename->location = (yylsp[-4]); n->val.type = T_String; - n->val.val.str = (yyvsp[(5) - (5)].str); + n->val.val.str = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -25087,9 +24864,9 @@ yyreduce: #line 8940 "gram.y" { A_Const *n = makeNode(A_Const); - n->typename = (yyvsp[(1) - (2)].typnam); + n->typename = (yyvsp[-1].typnam); n->val.type = T_String; - n->val.val.str = (yyvsp[(2) - (2)].str); + n->val.val.str = (yyvsp[0].str); (yyval.node) = (Node *)n; } break; @@ -25098,12 +24875,12 @@ yyreduce: #line 8948 "gram.y" { A_Const *n = makeNode(A_Const); - n->typename = (yyvsp[(1) - (3)].typnam); + n->typename = (yyvsp[-2].typnam); n->val.type = T_String; - n->val.val.str = (yyvsp[(2) - (3)].str); + n->val.val.str = (yyvsp[-1].str); /* precision is not specified, but fields may be... */ - if ((yyvsp[(3) - (3)].ival) != INTERVAL_FULL_RANGE) - n->typename->typmods = list_make1(makeIntConst((yyvsp[(3) - (3)].ival))); + if ((yyvsp[0].ival) != INTERVAL_FULL_RANGE) + n->typename->typmods = list_make1(makeIntConst((yyvsp[0].ival))); (yyval.node) = (Node *)n; } break; @@ -25112,11 +24889,11 @@ yyreduce: #line 8959 "gram.y" { A_Const *n = makeNode(A_Const); - n->typename = (yyvsp[(1) - (6)].typnam); + n->typename = (yyvsp[-5].typnam); n->val.type = T_String; - n->val.val.str = (yyvsp[(5) - (6)].str); - n->typename->typmods = list_make2(makeIntConst((yyvsp[(6) - (6)].ival)), - makeIntConst((yyvsp[(3) - (6)].ival))); + n->val.val.str = (yyvsp[-1].str); + n->typename->typmods = list_make2(makeIntConst((yyvsp[0].ival)), + makeIntConst((yyvsp[-3].ival))); (yyval.node) = (Node *)n; } break; @@ -25146,82 +24923,82 @@ yyreduce: case 1423: #line 8984 "gram.y" - { (yyval.ival) = (yyvsp[(1) - (1)].ival); } + { (yyval.ival) = (yyvsp[0].ival); } break; case 1424: #line 8985 "gram.y" - { (yyval.str) = (yyvsp[(1) - (1)].str); } + { (yyval.str) = (yyvsp[0].str); } break; case 1425: #line 8986 "gram.y" - { (yyval.str) = (yyvsp[(1) - (1)].str); } + { (yyval.str) = (yyvsp[0].str); } break; case 1426: #line 8988 "gram.y" - { (yyval.ival) = (yyvsp[(1) - (1)].ival); } + { (yyval.ival) = (yyvsp[0].ival); } break; case 1427: #line 8989 "gram.y" - { (yyval.ival) = - (yyvsp[(2) - (2)].ival); } + { (yyval.ival) = - (yyvsp[0].ival); } break; case 1428: #line 9005 "gram.y" - { (yyval.str) = (yyvsp[(1) - (1)].str); } + { (yyval.str) = (yyvsp[0].str); } break; case 1429: #line 9006 "gram.y" - { (yyval.str) = pstrdup((yyvsp[(1) - (1)].keyword)); } + { (yyval.str) = pstrdup((yyvsp[0].keyword)); } break; case 1430: #line 9007 "gram.y" - { (yyval.str) = pstrdup((yyvsp[(1) - (1)].keyword)); } + { (yyval.str) = pstrdup((yyvsp[0].keyword)); } break; case 1431: #line 9012 "gram.y" - { (yyval.str) = (yyvsp[(1) - (1)].str); } + { (yyval.str) = (yyvsp[0].str); } break; case 1432: #line 9013 "gram.y" - { (yyval.str) = pstrdup((yyvsp[(1) - (1)].keyword)); } + { (yyval.str) = pstrdup((yyvsp[0].keyword)); } break; case 1433: #line 9014 "gram.y" - { (yyval.str) = pstrdup((yyvsp[(1) - (1)].keyword)); } + { (yyval.str) = pstrdup((yyvsp[0].keyword)); } break; case 1434: #line 9020 "gram.y" - { (yyval.str) = (yyvsp[(1) - (1)].str); } + { (yyval.str) = (yyvsp[0].str); } break; case 1435: #line 9021 "gram.y" - { (yyval.str) = pstrdup((yyvsp[(1) - (1)].keyword)); } + { (yyval.str) = pstrdup((yyvsp[0].keyword)); } break; case 1436: #line 9022 "gram.y" - { (yyval.str) = pstrdup((yyvsp[(1) - (1)].keyword)); } + { (yyval.str) = pstrdup((yyvsp[0].keyword)); } break; case 1437: #line 9023 "gram.y" - { (yyval.str) = pstrdup((yyvsp[(1) - (1)].keyword)); } + { (yyval.str) = pstrdup((yyvsp[0].keyword)); } break; case 1438: #line 9024 "gram.y" - { (yyval.str) = pstrdup((yyvsp[(1) - (1)].keyword)); } + { (yyval.str) = pstrdup((yyvsp[0].keyword)); } break; case 1811: @@ -25249,14 +25026,16 @@ yyreduce: break; -/* Line 1267 of yacc.c. */ -#line 25254 "gram.c" default: break; } - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); - YYPOPSTACK (yylen); - yylen = 0; +/* Line 1126 of yacc.c. */ +#line 25034 "gram.c" + + yyvsp -= yylen; + yyssp -= yylen; + yylsp -= yylen; + YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; @@ -25285,41 +25064,110 @@ yyerrlab: if (!yyerrstatus) { ++yynerrs; -#if ! YYERROR_VERBOSE - yyerror (YY_("syntax error")); -#else - { - YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); - if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) - { - YYSIZE_T yyalloc = 2 * yysize; - if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) - yyalloc = YYSTACK_ALLOC_MAXIMUM; - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yyalloc); - if (yymsg) - yymsg_alloc = yyalloc; - else +#if YYERROR_VERBOSE + yyn = yypact[yystate]; + + if (YYPACT_NINF < yyn && yyn < YYLAST) + { + int yytype = YYTRANSLATE (yychar); + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); + YYSIZE_T yysize = yysize0; + YYSIZE_T yysize1; + int yysize_overflow = 0; + char *yymsg = 0; +# define YYERROR_VERBOSE_ARGS_MAXIMUM 5 + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + int yyx; + +#if 0 + /* This is so xgettext sees the translatable formats that are + constructed on the fly. */ + YY_("syntax error, unexpected %s"); + YY_("syntax error, unexpected %s, expecting %s"); + YY_("syntax error, unexpected %s, expecting %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); +#endif + char *yyfmt; + char const *yyf; + static char const yyunexpected[] = "syntax error, unexpected %s"; + static char const yyexpecting[] = ", expecting %s"; + static char const yyor[] = " or %s"; + char yyformat[sizeof yyunexpected + + sizeof yyexpecting - 1 + + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) + * (sizeof yyor - 1))]; + char const *yyprefix = yyexpecting; + + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yycount = 1; + + yyarg[0] = yytname[yytype]; + yyfmt = yystpcpy (yyformat, yyunexpected); + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + yyformat[sizeof yyunexpected - 1] = '\0'; + break; + } + yyarg[yycount++] = yytname[yyx]; + yysize1 = yysize + yytnamerr (0, yytname[yyx]); + yysize_overflow |= yysize1 < yysize; + yysize = yysize1; + yyfmt = yystpcpy (yyfmt, yyprefix); + yyprefix = yyor; } - } - if (0 < yysize && yysize <= yymsg_alloc) - { - (void) yysyntax_error (yymsg, yystate, yychar); - yyerror (yymsg); - } - else - { - yyerror (YY_("syntax error")); - if (yysize != 0) + yyf = YY_(yyformat); + yysize1 = yysize + yystrlen (yyf); + yysize_overflow |= yysize1 < yysize; + yysize = yysize1; + + if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM) + yymsg = (char *) YYSTACK_ALLOC (yysize); + if (yymsg) + { + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + char *yyp = yymsg; + int yyi = 0; + while ((*yyp = *yyf)) + { + if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyf += 2; + } + else + { + yyp++; + yyf++; + } + } + yyerror (yymsg); + YYSTACK_FREE (yymsg); + } + else + { + yyerror (YY_("syntax error")); goto yyexhaustedlab; - } - } -#endif + } + } + else +#endif /* YYERROR_VERBOSE */ + yyerror (YY_("syntax error")); } yyerror_range[0] = yylloc; @@ -25330,15 +25178,14 @@ yyerrlab: error, discard it. */ if (yychar <= YYEOF) - { + { /* Return failure if at end of input. */ if (yychar == YYEOF) YYABORT; - } + } else { - yydestruct ("Error: discarding", - yytoken, &yylval, &yylloc); + yydestruct ("Error: discarding", yytoken, &yylval, &yylloc); yychar = YYEMPTY; } } @@ -25356,15 +25203,13 @@ yyerrorlab: /* Pacify compilers like GCC when the user code never invokes YYERROR and the label yyerrorlab therefore never appears in user code. */ - if (/*CONSTCOND*/ 0) + if (0) goto yyerrorlab; yyerror_range[0] = yylsp[1-yylen]; - /* Do not reclaim the symbols of the rule which action triggered - this YYERROR. */ - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); + yylsp -= yylen; + yyvsp -= yylen; + yyssp -= yylen; yystate = *yyssp; goto yyerrlab1; @@ -25394,9 +25239,8 @@ yyerrlab1: YYABORT; yyerror_range[0] = *yylsp; - yydestruct ("Error: popping", - yystos[yystate], yyvsp, yylsp); - YYPOPSTACK (1); + yydestruct ("Error: popping", yystos[yystate], yyvsp, yylsp); + YYPOPSTACK; yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } @@ -25408,11 +25252,11 @@ yyerrlab1: yyerror_range[1] = yylloc; /* Using YYLLOC is tempting, but would change the location of - the look-ahead. YYLOC is available though. */ - YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2); + the look-ahead. YYLOC is available though. */ + YYLLOC_DEFAULT (yyloc, yyerror_range - 1, 2); *++yylsp = yyloc; - /* Shift the error token. */ + /* Shift the error token. */ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); yystate = yyn; @@ -25447,26 +25291,17 @@ yyreturn: if (yychar != YYEOF && yychar != YYEMPTY) yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval, &yylloc); - /* Do not reclaim the symbols of the rule which action triggered - this YYABORT or YYACCEPT. */ - YYPOPSTACK (yylen); - YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", yystos[*yyssp], yyvsp, yylsp); - YYPOPSTACK (1); + YYPOPSTACK; } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif -#if YYERROR_VERBOSE - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); -#endif - /* Make sure YYID is used. */ - return YYID (yyresult); + return yyresult; } diff --git a/parser/gram.h b/parser/gram.h index 1cd0ed794..833406b21 100644 --- a/parser/gram.h +++ b/parser/gram.h @@ -1,9 +1,7 @@ -/* A Bison parser, made by GNU Bison 2.3. */ +/* A Bison parser, made by GNU Bison 2.1. */ -/* Skeleton interface for Bison's Yacc-like parsers in C - - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 - Free Software Foundation, Inc. +/* Skeleton parser for Yacc-like parsing with Bison, + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,18 +18,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ +/* As a special exception, when this file is copied by Bison into a + Bison output file, you may use that output file without restriction. + This special exception was added by the Free Software Foundation + in version 1.24 of Bison. */ /* Tokens. */ #ifndef YYTOKENTYPE @@ -822,10 +812,9 @@ -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE +#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) #line 145 "gram.y" -{ +typedef union YYSTYPE { int ival; char chr; char *str; @@ -856,10 +845,9 @@ typedef union YYSTYPE InsertStmt *istmt; VariableSetStmt *vsetstmt; -} -/* Line 1489 of yacc.c. */ -#line 862 "gram.h" - YYSTYPE; +} YYSTYPE; +/* Line 1447 of yacc.c. */ +#line 851 "gram.h" # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 @@ -867,7 +855,7 @@ typedef union YYSTYPE extern YYSTYPE base_yylval; -#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED +#if ! defined (YYLTYPE) && ! defined (YYLTYPE_IS_DECLARED) typedef struct YYLTYPE { int first_line; @@ -881,3 +869,5 @@ typedef struct YYLTYPE #endif extern YYLTYPE base_yylloc; + + diff --git a/pgpool.conf.sample b/pgpool.conf.sample index 1c0bf0c3b..621e6c18f 100644 --- a/pgpool.conf.sample +++ b/pgpool.conf.sample @@ -43,6 +43,11 @@ connection_life_time = 0 # 0 means no exit. child_max_connections = 0 +# If child_idle_limit is n (n > 0), the child is forced to be +# disconnected after n seconds idle between transactions. +# 0 means no disconnect. +child_idle_limit = 0 + # Logging directory logdir = '/tmp' diff --git a/pool.h b/pool.h index fbeb8e385..47e19c8e5 100644 --- a/pool.h +++ b/pool.h @@ -134,6 +134,8 @@ typedef struct { int child_life_time; /* if idle for this seconds, child exits */ int connection_life_time; /* if idle for this seconds, connection closes */ int child_max_connections; /* if max_connections received, child exits */ + int child_idle_limit; /* If child_idle_limit is n (n > 0), the child is forced to be + disconnected after n seconds idle between transactions */ int max_pool; /* max # of connection pool per child */ char *logdir; /* logging directory */ char *backend_socket_dir; /* Unix domain socket directory for the PostgreSQL server */ diff --git a/pool_config.c b/pool_config.c index 428d3f6fc..3867cef44 100644 --- a/pool_config.c +++ b/pool_config.c @@ -1,93 +1,32 @@ - -#line 3 "pool_config.c" - -#define YY_INT_ALIGNED short int - /* A lexical scanner generated by flex */ +/* Scanner skeleton version: + * $Header$ + */ + #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 33 -#if YY_FLEX_SUBMINOR_VERSION > 0 -#define FLEX_BETA -#endif -/* First, we deal with platform-specific or compiler-specific issues. */ - -/* begin standard C headers. */ #include <stdio.h> -#include <string.h> -#include <errno.h> -#include <stdlib.h> - -/* end standard C headers. */ - -/* flex integer type definitions */ - -#ifndef FLEXINT_H -#define FLEXINT_H - -/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ - -#if __STDC_VERSION__ >= 199901L - -/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. - */ -#ifndef __STDC_LIMIT_MACROS -#define __STDC_LIMIT_MACROS 1 -#endif +#include <unistd.h> -#include <inttypes.h> -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; -typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; -typedef uint32_t flex_uint32_t; -#else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; -typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; -#endif /* ! C99 */ -/* Limits of integral types. */ -#ifndef INT8_MIN -#define INT8_MIN (-128) -#endif -#ifndef INT16_MIN -#define INT16_MIN (-32767-1) -#endif -#ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) -#endif -#ifndef INT8_MAX -#define INT8_MAX (127) -#endif -#ifndef INT16_MAX -#define INT16_MAX (32767) -#endif -#ifndef INT32_MAX -#define INT32_MAX (2147483647) -#endif -#ifndef UINT8_MAX -#define UINT8_MAX (255U) +/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ +#ifdef c_plusplus +#ifndef __cplusplus +#define __cplusplus #endif -#ifndef UINT16_MAX -#define UINT16_MAX (65535U) -#endif -#ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) #endif -#endif /* ! FLEXINT_H */ #ifdef __cplusplus +#include <stdlib.h> + +/* Use prototypes in function declarations. */ +#define YY_USE_PROTOS + /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST @@ -95,17 +34,34 @@ typedef unsigned int flex_uint32_t; #if __STDC__ +#define YY_USE_PROTOS #define YY_USE_CONST #endif /* __STDC__ */ #endif /* ! __cplusplus */ +#ifdef __TURBOC__ + #pragma warn -rch + #pragma warn -use +#include <io.h> +#include <stdlib.h> +#define YY_USE_CONST +#define YY_USE_PROTOS +#endif + #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif + +#ifdef YY_USE_PROTOS +#define YY_PROTO(proto) proto +#else +#define YY_PROTO(proto) () +#endif + /* Returned upon end-of-file. */ #define YY_NULL 0 @@ -120,75 +76,71 @@ typedef unsigned int flex_uint32_t; * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ -#define BEGIN (yy_start) = 1 + 2 * +#define BEGIN yy_start = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ -#define YY_START (((yy_start) - 1) / 2) +#define YY_START ((yy_start - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart(yyin ) +#define YY_NEW_FILE yyrestart( yyin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ -#ifndef YY_BUF_SIZE #define YY_BUF_SIZE 16384 -#endif -/* The state buf must be large enough to hold one state per character in the main buffer. - */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) - -#ifndef YY_TYPEDEF_YY_BUFFER_STATE -#define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; -#endif extern int yyleng; - extern FILE *yyin, *yyout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 - #define YY_LESS_LINENO(n) - -/* Return all but the first "n" matched characters back to the input stream. */ +/* The funky do-while in the following #define is used to turn the definition + * int a single C statement (which needs a semi-colon terminator). This + * avoids problems with code like: + * + * if ( condition_holds ) + * yyless( 5 ); + * else + * do_something_else(); + * + * Prior to using the do-while the compiler would get upset at the + * "else" because it interpreted the "if" statement as being all + * done when it reached the ';' after the yyless() call. + */ + +/* Return all but the first 'n' matched characters back to the input stream. */ + #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - *yy_cp = (yy_hold_char); \ + *yy_cp = yy_hold_char; \ YY_RESTORE_YY_MORE_OFFSET \ - (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) -#define unput(c) yyunput( c, (yytext_ptr) ) +#define unput(c) yyunput( c, yytext_ptr ) /* The following is because we cannot portably get our hands on size_t * (without autoconf's help, which isn't available because we want * flex-generated scanners to compile on their own). */ - -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T typedef unsigned int yy_size_t; -#endif -#ifndef YY_STRUCT_YY_BUFFER_STATE -#define YY_STRUCT_YY_BUFFER_STATE + struct yy_buffer_state { FILE *yy_input_file; @@ -225,16 +177,12 @@ struct yy_buffer_state */ int yy_at_bol; - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; - #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process @@ -248,38 +196,28 @@ struct yy_buffer_state * just pointing yyin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 - }; -#endif /* !YY_STRUCT_YY_BUFFER_STATE */ -/* Stack of input buffers. */ -static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ -static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ -static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ +static YY_BUFFER_STATE yy_current_buffer = 0; /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". - * - * Returns the top of the stack, or NULL. */ -#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ - ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ - : NULL) +#define YY_CURRENT_BUFFER yy_current_buffer -/* Same as previous macro, but useful when we know that the buffer stack is not - * NULL or when we need an lvalue. For internal use only. - */ -#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] /* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; + static int yy_n_chars; /* number of characters read into yy_ch_buf */ + + int yyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; -static int yy_init = 0; /* whether we need to initialize */ +static int yy_init = 1; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* Flag which is used to allow yywrap()'s to do buffer switches @@ -287,95 +225,69 @@ static int yy_start = 0; /* start state number */ */ static int yy_did_buffer_switch_on_eof; -void yyrestart (FILE *input_file ); -void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); -YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ); -void yy_delete_buffer (YY_BUFFER_STATE b ); -void yy_flush_buffer (YY_BUFFER_STATE b ); -void yypush_buffer_state (YY_BUFFER_STATE new_buffer ); -void yypop_buffer_state (void ); +void yyrestart YY_PROTO(( FILE *input_file )); -static void yyensure_buffer_stack (void ); -static void yy_load_buffer_state (void ); -static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); +void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); +void yy_load_buffer_state YY_PROTO(( void )); +YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); +void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); +void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); +void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); +#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) -#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) +YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); +YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); +YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); -YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); -YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); -YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ); - -void *yyalloc (yy_size_t ); -void *yyrealloc (void *,yy_size_t ); -void yyfree (void * ); +static void *yy_flex_alloc YY_PROTO(( yy_size_t )); +static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); +static void yy_flex_free YY_PROTO(( void * )); #define yy_new_buffer yy_create_buffer #define yy_set_interactive(is_interactive) \ { \ - if ( ! YY_CURRENT_BUFFER ){ \ - yyensure_buffer_stack (); \ - YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer(yyin,YY_BUF_SIZE ); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + if ( ! yy_current_buffer ) \ + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ + yy_current_buffer->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ - if ( ! YY_CURRENT_BUFFER ){\ - yyensure_buffer_stack (); \ - YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer(yyin,YY_BUF_SIZE ); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + if ( ! yy_current_buffer ) \ + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ + yy_current_buffer->yy_at_bol = at_bol; \ } -#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) +#define YY_AT_BOL() (yy_current_buffer->yy_at_bol) -/* Begin user sect3 */ -#define yywrap(n) 1 +#define yywrap() 1 #define YY_SKIP_YYWRAP - typedef unsigned char YY_CHAR; - FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; - typedef int yy_state_type; - -extern int yylineno; - -int yylineno = 1; - extern char *yytext; #define yytext_ptr yytext -static yy_state_type yy_get_previous_state (void ); -static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); -static int yy_get_next_buffer (void ); -static void yy_fatal_error (yyconst char msg[] ); +static yy_state_type yy_get_previous_state YY_PROTO(( void )); +static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); +static int yy_get_next_buffer YY_PROTO(( void )); +static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ - (yytext_ptr) = yy_bp; \ - yyleng = (size_t) (yy_cp - yy_bp); \ - (yy_hold_char) = *yy_cp; \ + yytext_ptr = yy_bp; \ + yyleng = (int) (yy_cp - yy_bp); \ + yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ - (yy_c_buf_p) = yy_cp; + yy_c_buf_p = yy_cp; #define YY_NUM_RULES 11 #define YY_END_OF_BUFFER 12 -/* This struct is not used in this scanner, - but its presence is necessary. */ -struct yy_trans_info - { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; - }; -static yyconst flex_int16_t yy_accept[38] = +static yyconst short int yy_accept[38] = { 0, 0, 0, 12, 10, 2, 1, 10, 10, 10, 8, 7, 7, 9, 4, 2, 0, 3, 0, 5, 0, @@ -383,7 +295,7 @@ static yyconst flex_int16_t yy_accept[38] = 5, 0, 0, 8, 7, 6, 0 } ; -static yyconst flex_int32_t yy_ec[256] = +static yyconst int yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, @@ -415,13 +327,13 @@ static yyconst flex_int32_t yy_ec[256] = 15, 15, 15, 15, 15 } ; -static yyconst flex_int32_t yy_meta[19] = +static yyconst int yy_meta[19] = { 0, 1, 1, 2, 1, 1, 1, 3, 3, 3, 4, 4, 1, 5, 4, 3, 1, 3, 3 } ; -static yyconst flex_int16_t yy_base[45] = +static yyconst short int yy_base[45] = { 0, 0, 0, 61, 86, 58, 86, 55, 14, 23, 43, 10, 46, 86, 28, 47, 40, 86, 16, 86, 22, @@ -430,7 +342,7 @@ static yyconst flex_int16_t yy_base[45] = 70, 75, 77, 80 } ; -static yyconst flex_int16_t yy_def[45] = +static yyconst short int yy_def[45] = { 0, 37, 1, 37, 37, 37, 37, 38, 39, 37, 40, 9, 9, 37, 41, 37, 38, 37, 39, 37, 42, @@ -439,7 +351,7 @@ static yyconst flex_int16_t yy_def[45] = 37, 37, 37, 37 } ; -static yyconst flex_int16_t yy_nxt[105] = +static yyconst short int yy_nxt[105] = { 0, 4, 5, 6, 7, 8, 9, 9, 10, 4, 11, 12, 13, 14, 14, 14, 4, 14, 14, 19, 23, @@ -455,7 +367,7 @@ static yyconst flex_int16_t yy_nxt[105] = 37, 37, 37, 37 } ; -static yyconst flex_int16_t yy_chk[105] = +static yyconst short int yy_chk[105] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 11, @@ -474,9 +386,6 @@ static yyconst flex_int16_t yy_chk[105] = static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; -extern int yy_flex_debug; -int yy_flex_debug = 0; - /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ @@ -486,6 +395,7 @@ int yy_flex_debug = 0; #define YY_RESTORE_YY_MORE_OFFSET char *yytext; #line 1 "pool_config.l" +#define INITIAL 0 /* -*-pgsql-c-*- */ /* * @@ -543,23 +453,9 @@ static char **extract_string_tokens(char *str, char *delim, int *n); static int eval_logical(char *str); static void clear_host_entry(int slot); -#line 547 "pool_config.c" - -#define INITIAL 0 - -#ifndef YY_NO_UNISTD_H -/* Special case for "unistd.h", since it is non-ANSI. We include it way - * down here because we want the user's section 1 to have been scanned first. - * The user has a chance to override it with an option. - */ -#include <unistd.h> -#endif - -#ifndef YY_EXTRA_TYPE -#define YY_EXTRA_TYPE void * -#endif - -static int yy_init_globals (void ); +#define YY_NEVER_INTERACTIVE 1 +#define YY_NO_UNPUT 1 +#line 459 "pool_config.c" /* Macros after this point can all be overridden by user definitions in * section 1. @@ -567,28 +463,65 @@ static int yy_init_globals (void ); #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap (void ); +extern "C" int yywrap YY_PROTO(( void )); #else -extern int yywrap (void ); +extern int yywrap YY_PROTO(( void )); #endif #endif +#ifndef YY_NO_UNPUT +static void yyunput YY_PROTO(( int c, char *buf_ptr )); +#endif + #ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int ); +static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * ); +static int yy_flex_strlen YY_PROTO(( yyconst char * )); #endif #ifndef YY_NO_INPUT - #ifdef __cplusplus -static int yyinput (void ); +static int yyinput YY_PROTO(( void )); #else -static int input (void ); +static int input YY_PROTO(( void )); +#endif #endif +#if YY_STACK_USED +static int yy_start_stack_ptr = 0; +static int yy_start_stack_depth = 0; +static int *yy_start_stack = 0; +#ifndef YY_NO_PUSH_STATE +static void yy_push_state YY_PROTO(( int new_state )); +#endif +#ifndef YY_NO_POP_STATE +static void yy_pop_state YY_PROTO(( void )); +#endif +#ifndef YY_NO_TOP_STATE +static int yy_top_state YY_PROTO(( void )); +#endif + +#else +#define YY_NO_PUSH_STATE 1 +#define YY_NO_POP_STATE 1 +#define YY_NO_TOP_STATE 1 +#endif + +#ifdef YY_MALLOC_DECL +YY_MALLOC_DECL +#else +#if __STDC__ +#ifndef __cplusplus +#include <stdlib.h> +#endif +#else +/* Just try to get by without declaring the routines. This will fail + * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) + * or sizeof(void*) != sizeof(int). + */ +#endif #endif /* Amount of stuff to slurp up with each read. */ @@ -597,6 +530,7 @@ static int input (void ); #endif /* Copy whatever the last rule matched to the standard output. */ + #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). @@ -609,10 +543,9 @@ static int input (void ); */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ - if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + if ( yy_current_buffer->yy_is_interactive ) \ { \ - int c = '*'; \ - size_t n; \ + int c = '*', n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -622,22 +555,9 @@ static int input (void ); YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ - else \ - { \ - errno=0; \ - while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ - { \ - if( errno != EINTR) \ - { \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - break; \ - } \ - errno=0; \ - clearerr(yyin); \ - } \ - }\ -\ - + else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ + && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - @@ -658,18 +578,12 @@ static int input (void ); #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif -/* end tables serialization structures and prototypes */ - /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL -#define YY_DECL_IS_OURS 1 - -extern int yylex (void); - -#define YY_DECL int yylex (void) -#endif /* !YY_DECL */ +#define YY_DECL int yylex YY_PROTO(( void )) +#endif /* Code executed at the beginning of each rule, after yytext and yyleng * have been set up. @@ -686,29 +600,27 @@ extern int yylex (void); #define YY_RULE_SETUP \ YY_USER_ACTION -/** The main scanner function which does all the work. - */ YY_DECL -{ + { register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; + register char *yy_cp = NULL, *yy_bp = NULL; register int yy_act; - + #line 83 "pool_config.l" -#line 701 "pool_config.c" +#line 613 "pool_config.c" - if ( !(yy_init) ) + if ( yy_init ) { - (yy_init) = 1; + yy_init = 0; #ifdef YY_USER_INIT YY_USER_INIT; #endif - if ( ! (yy_start) ) - (yy_start) = 1; /* first start state */ + if ( ! yy_start ) + yy_start = 1; /* first start state */ if ( ! yyin ) yyin = stdin; @@ -716,36 +628,34 @@ YY_DECL if ( ! yyout ) yyout = stdout; - if ( ! YY_CURRENT_BUFFER ) { - yyensure_buffer_stack (); - YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer(yyin,YY_BUF_SIZE ); - } + if ( ! yy_current_buffer ) + yy_current_buffer = + yy_create_buffer( yyin, YY_BUF_SIZE ); - yy_load_buffer_state( ); + yy_load_buffer_state(); } while ( 1 ) /* loops until end-of-file is reached */ { - yy_cp = (yy_c_buf_p); + yy_cp = yy_c_buf_p; /* Support of yytext. */ - *yy_cp = (yy_hold_char); + *yy_cp = yy_hold_char; /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; - yy_current_state = (yy_start); + yy_current_state = yy_start; yy_match: do { register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; if ( yy_accept[yy_current_state] ) { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; + yy_last_accepting_state = yy_current_state; + yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { @@ -756,28 +666,33 @@ yy_match: yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } - while ( yy_current_state != 37 ); - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); + while ( yy_base[yy_current_state] != 86 ); yy_find_action: yy_act = yy_accept[yy_current_state]; + if ( yy_act == 0 ) + { /* have to back up */ + yy_cp = yy_last_accepting_cpos; + yy_current_state = yy_last_accepting_state; + yy_act = yy_accept[yy_current_state]; + } YY_DO_BEFORE_ACTION; + do_action: /* This label is used only to access EOF actions. */ + switch ( yy_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = (yy_hold_char); - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); + *yy_cp = yy_hold_char; + yy_cp = yy_last_accepting_cpos; + yy_current_state = yy_last_accepting_state; goto yy_find_action; case 1: -/* rule 1 can match eol */ YY_RULE_SETUP #line 85 "pool_config.l" Lineno++; return POOL_EOL; @@ -788,8 +703,8 @@ YY_RULE_SETUP /* eat whitespace */ YY_BREAK case 3: -*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ -(yy_c_buf_p) = yy_cp -= 1; +*yy_cp = yy_hold_char; /* undo effects of setting up yytext */ +yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 87 "pool_config.l" @@ -835,33 +750,33 @@ YY_RULE_SETUP #line 98 "pool_config.l" ECHO; YY_BREAK -#line 839 "pool_config.c" +#line 754 "pool_config.c" case YY_STATE_EOF(INITIAL): yyterminate(); case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; + int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = (yy_hold_char); + *yy_cp = yy_hold_char; YY_RESTORE_YY_MORE_OFFSET - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed yyin at a new source and called * yylex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our + * consistency between yy_current_buffer and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + yy_n_chars = yy_current_buffer->yy_n_chars; + yy_current_buffer->yy_input_file = yyin; + yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position @@ -871,13 +786,13 @@ case YY_STATE_EOF(INITIAL): * end-of-buffer state). Contrast this with the test * in input(). */ - if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) { /* This was really a NUL. */ yy_state_type yy_next_state; - (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; + yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; - yy_current_state = yy_get_previous_state( ); + yy_current_state = yy_get_previous_state(); /* Okay, we're now positioned to make the NUL * transition. We couldn't have @@ -890,31 +805,30 @@ case YY_STATE_EOF(INITIAL): yy_next_state = yy_try_NUL_trans( yy_current_state ); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; + yy_bp = yytext_ptr + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ - yy_cp = ++(yy_c_buf_p); + yy_cp = ++yy_c_buf_p; yy_current_state = yy_next_state; goto yy_match; } else { - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); + yy_cp = yy_c_buf_p; goto yy_find_action; } } - else switch ( yy_get_next_buffer( ) ) + else switch ( yy_get_next_buffer() ) { case EOB_ACT_END_OF_FILE: { - (yy_did_buffer_switch_on_eof) = 0; + yy_did_buffer_switch_on_eof = 0; - if ( yywrap( ) ) + if ( yywrap() ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up @@ -925,7 +839,7 @@ case YY_STATE_EOF(INITIAL): * YY_NULL, it'll still work - another * YY_NULL will get returned. */ - (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; + yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; @@ -933,30 +847,30 @@ case YY_STATE_EOF(INITIAL): else { - if ( ! (yy_did_buffer_switch_on_eof) ) + if ( ! yy_did_buffer_switch_on_eof ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: - (yy_c_buf_p) = - (yytext_ptr) + yy_amount_of_matched_text; + yy_c_buf_p = + yytext_ptr + yy_amount_of_matched_text; - yy_current_state = yy_get_previous_state( ); + yy_current_state = yy_get_previous_state(); - yy_cp = (yy_c_buf_p); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; + yy_cp = yy_c_buf_p; + yy_bp = yytext_ptr + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: - (yy_c_buf_p) = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; + yy_c_buf_p = + &yy_current_buffer->yy_ch_buf[yy_n_chars]; - yy_current_state = yy_get_previous_state( ); + yy_current_state = yy_get_previous_state(); - yy_cp = (yy_c_buf_p); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; + yy_cp = yy_c_buf_p; + yy_bp = yytext_ptr + YY_MORE_ADJ; goto yy_find_action; } break; @@ -967,7 +881,8 @@ case YY_STATE_EOF(INITIAL): "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ -} /* end of yylex */ + } /* end of yylex */ + /* yy_get_next_buffer - try to read in a new buffer * @@ -976,20 +891,21 @@ case YY_STATE_EOF(INITIAL): * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ -static int yy_get_next_buffer (void) -{ - register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - register char *source = (yytext_ptr); + +static int yy_get_next_buffer() + { + register char *dest = yy_current_buffer->yy_ch_buf; + register char *source = yytext_ptr; register int number_to_move, i; int ret_val; - if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) + if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + if ( yy_current_buffer->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ - if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) + if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. @@ -1009,30 +925,34 @@ static int yy_get_next_buffer (void) /* Try to read more data. */ /* First move last chars to start of buffer. */ - number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; + number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; + yy_current_buffer->yy_n_chars = yy_n_chars = 0; else { - int num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + int num_to_read = + yy_current_buffer->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ +#ifdef YY_USES_REJECT + YY_FATAL_ERROR( +"input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); +#else /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER; + YY_BUFFER_STATE b = yy_current_buffer; int yy_c_buf_p_offset = - (int) ((yy_c_buf_p) - b->yy_ch_buf); + (int) (yy_c_buf_p - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { @@ -1045,7 +965,8 @@ static int yy_get_next_buffer (void) b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ - yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); + yy_flex_realloc( (void *) b->yy_ch_buf, + b->yy_buf_size + 2 ); } else /* Can't grow it, we don't own it. */ @@ -1055,35 +976,35 @@ static int yy_get_next_buffer (void) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); - (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; + yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1; - +#endif } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - (yy_n_chars), num_to_read ); + YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), + yy_n_chars, num_to_read ); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + yy_current_buffer->yy_n_chars = yy_n_chars; } - if ( (yy_n_chars) == 0 ) + if ( yy_n_chars == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; - yyrestart(yyin ); + yyrestart( yyin ); } else { ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + yy_current_buffer->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } @@ -1091,31 +1012,32 @@ static int yy_get_next_buffer (void) else ret_val = EOB_ACT_CONTINUE_SCAN; - (yy_n_chars) += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; + yy_n_chars += number_to_move; + yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; + yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; return ret_val; -} + } + /* yy_get_previous_state - get the state just before the EOB char was reached */ - static yy_state_type yy_get_previous_state (void) -{ +static yy_state_type yy_get_previous_state() + { register yy_state_type yy_current_state; register char *yy_cp; - - yy_current_state = (yy_start); - for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) + yy_current_state = yy_start; + + for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) { register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; + yy_last_accepting_state = yy_current_state; + yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { @@ -1127,23 +1049,30 @@ static int yy_get_next_buffer (void) } return yy_current_state; -} + } + /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ - static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) -{ + +#ifdef YY_USE_PROTOS +static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) +#else +static yy_state_type yy_try_NUL_trans( yy_current_state ) +yy_state_type yy_current_state; +#endif + { register int yy_is_jam; - register char *yy_cp = (yy_c_buf_p); + register char *yy_cp = yy_c_buf_p; register YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; + yy_last_accepting_state = yy_current_state; + yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { @@ -1155,36 +1084,81 @@ static int yy_get_next_buffer (void) yy_is_jam = (yy_current_state == 37); return yy_is_jam ? 0 : yy_current_state; -} + } + + +#ifndef YY_NO_UNPUT +#ifdef YY_USE_PROTOS +static void yyunput( int c, register char *yy_bp ) +#else +static void yyunput( c, yy_bp ) +int c; +register char *yy_bp; +#endif + { + register char *yy_cp = yy_c_buf_p; + + /* undo effects of setting up yytext */ + *yy_cp = yy_hold_char; + + if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) + { /* need to shift things up to make room */ + /* +2 for EOB chars. */ + register int number_to_move = yy_n_chars + 2; + register char *dest = &yy_current_buffer->yy_ch_buf[ + yy_current_buffer->yy_buf_size + 2]; + register char *source = + &yy_current_buffer->yy_ch_buf[number_to_move]; + + while ( source > yy_current_buffer->yy_ch_buf ) + *--dest = *--source; + + yy_cp += (int) (dest - source); + yy_bp += (int) (dest - source); + yy_current_buffer->yy_n_chars = + yy_n_chars = yy_current_buffer->yy_buf_size; + + if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) + YY_FATAL_ERROR( "flex scanner push-back overflow" ); + } + + *--yy_cp = (char) c; + + + yytext_ptr = yy_bp; + yy_hold_char = *yy_cp; + yy_c_buf_p = yy_cp; + } +#endif /* ifndef YY_NO_UNPUT */ + #ifndef YY_NO_INPUT #ifdef __cplusplus - static int yyinput (void) +static int yyinput() #else - static int input (void) +static int input() #endif - -{ + { int c; - - *(yy_c_buf_p) = (yy_hold_char); - if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) + *yy_c_buf_p = yy_hold_char; + + if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ - if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) /* This was really a NUL. */ - *(yy_c_buf_p) = '\0'; + *yy_c_buf_p = '\0'; else { /* need more input */ - int offset = (yy_c_buf_p) - (yytext_ptr); - ++(yy_c_buf_p); + int offset = yy_c_buf_p - yytext_ptr; + ++yy_c_buf_p; - switch ( yy_get_next_buffer( ) ) + switch ( yy_get_next_buffer() ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() @@ -1198,16 +1172,16 @@ static int yy_get_next_buffer (void) */ /* Reset buffer status. */ - yyrestart(yyin ); + yyrestart( yyin ); - /*FALLTHROUGH*/ + /* fall through */ case EOB_ACT_END_OF_FILE: { - if ( yywrap( ) ) + if ( yywrap() ) return EOF; - if ( ! (yy_did_buffer_switch_on_eof) ) + if ( ! yy_did_buffer_switch_on_eof ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); @@ -1217,92 +1191,90 @@ static int yy_get_next_buffer (void) } case EOB_ACT_CONTINUE_SCAN: - (yy_c_buf_p) = (yytext_ptr) + offset; + yy_c_buf_p = yytext_ptr + offset; break; } } } - c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ - *(yy_c_buf_p) = '\0'; /* preserve yytext */ - (yy_hold_char) = *++(yy_c_buf_p); + c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ + *yy_c_buf_p = '\0'; /* preserve yytext */ + yy_hold_char = *++yy_c_buf_p; + return c; -} -#endif /* ifndef YY_NO_INPUT */ + } +#endif /* YY_NO_INPUT */ -/** Immediately switch to a different input stream. - * @param input_file A readable stream. - * - * @note This function does not reset the start condition to @c INITIAL . - */ - void yyrestart (FILE * input_file ) -{ - - if ( ! YY_CURRENT_BUFFER ){ - yyensure_buffer_stack (); - YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer(yyin,YY_BUF_SIZE ); +#ifdef YY_USE_PROTOS +void yyrestart( FILE *input_file ) +#else +void yyrestart( input_file ) +FILE *input_file; +#endif + { + if ( ! yy_current_buffer ) + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); + + yy_init_buffer( yy_current_buffer, input_file ); + yy_load_buffer_state(); } - yy_init_buffer(YY_CURRENT_BUFFER,input_file ); - yy_load_buffer_state( ); -} -/** Switch to a different input buffer. - * @param new_buffer The new input buffer. - * - */ - void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) -{ - - /* TODO. We should be able to replace this entire function body - * with - * yypop_buffer_state(); - * yypush_buffer_state(new_buffer); - */ - yyensure_buffer_stack (); - if ( YY_CURRENT_BUFFER == new_buffer ) +#ifdef YY_USE_PROTOS +void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) +#else +void yy_switch_to_buffer( new_buffer ) +YY_BUFFER_STATE new_buffer; +#endif + { + if ( yy_current_buffer == new_buffer ) return; - if ( YY_CURRENT_BUFFER ) + if ( yy_current_buffer ) { /* Flush out information for old buffer. */ - *(yy_c_buf_p) = (yy_hold_char); - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + *yy_c_buf_p = yy_hold_char; + yy_current_buffer->yy_buf_pos = yy_c_buf_p; + yy_current_buffer->yy_n_chars = yy_n_chars; } - YY_CURRENT_BUFFER_LVALUE = new_buffer; - yy_load_buffer_state( ); + yy_current_buffer = new_buffer; + yy_load_buffer_state(); /* We don't actually know whether we did this switch during * EOF (yywrap()) processing, but the only time this flag * is looked at is after yywrap() is called, so it's safe * to go ahead and always set it. */ - (yy_did_buffer_switch_on_eof) = 1; -} + yy_did_buffer_switch_on_eof = 1; + } -static void yy_load_buffer_state (void) -{ - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - (yy_hold_char) = *(yy_c_buf_p); -} -/** Allocate and initialize an input buffer state. - * @param file A readable stream. - * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. - * - * @return the allocated buffer state. - */ - YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) -{ +#ifdef YY_USE_PROTOS +void yy_load_buffer_state( void ) +#else +void yy_load_buffer_state() +#endif + { + yy_n_chars = yy_current_buffer->yy_n_chars; + yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; + yyin = yy_current_buffer->yy_input_file; + yy_hold_char = *yy_c_buf_p; + } + + +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) +#else +YY_BUFFER_STATE yy_create_buffer( file, size ) +FILE *file; +int size; +#endif + { YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); + + b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); @@ -1311,71 +1283,75 @@ static void yy_load_buffer_state (void) /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ - b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ); + b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_is_our_buffer = 1; - yy_init_buffer(b,file ); + yy_init_buffer( b, file ); return b; -} + } -/** Destroy the buffer. - * @param b a buffer created with yy_create_buffer() - * - */ - void yy_delete_buffer (YY_BUFFER_STATE b ) -{ - + +#ifdef YY_USE_PROTOS +void yy_delete_buffer( YY_BUFFER_STATE b ) +#else +void yy_delete_buffer( b ) +YY_BUFFER_STATE b; +#endif + { if ( ! b ) return; - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + if ( b == yy_current_buffer ) + yy_current_buffer = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) - yyfree((void *) b->yy_ch_buf ); + yy_flex_free( (void *) b->yy_ch_buf ); - yyfree((void *) b ); -} + yy_flex_free( (void *) b ); + } -/* Initializes or reinitializes a buffer. - * This function is sometimes called more than once on the same buffer, - * such as during a yyrestart() or at EOF. - */ - static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) -{ - int oerrno = errno; - - yy_flush_buffer(b ); + +#ifdef YY_USE_PROTOS +void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) +#else +void yy_init_buffer( b, file ) +YY_BUFFER_STATE b; +FILE *file; +#endif + + + { + yy_flush_buffer( b ); b->yy_input_file = file; b->yy_fill_buffer = 1; - /* If b is the current buffer, then yy_init_buffer was _probably_ - * called from yyrestart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER){ - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } - - b->yy_is_interactive = 0; - - errno = oerrno; -} +#if YY_ALWAYS_INTERACTIVE + b->yy_is_interactive = 1; +#else +#if YY_NEVER_INTERACTIVE + b->yy_is_interactive = 0; +#else + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; +#endif +#endif + } -/** Discard all buffered characters. On the next scan, YY_INPUT will be called. - * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. - * - */ - void yy_flush_buffer (YY_BUFFER_STATE b ) -{ - if ( ! b ) + +#ifdef YY_USE_PROTOS +void yy_flush_buffer( YY_BUFFER_STATE b ) +#else +void yy_flush_buffer( b ) +YY_BUFFER_STATE b; +#endif + + { + if ( ! b ) return; b->yy_n_chars = 0; @@ -1392,121 +1368,29 @@ static void yy_load_buffer_state (void) b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; - if ( b == YY_CURRENT_BUFFER ) - yy_load_buffer_state( ); -} - -/** Pushes the new state onto the stack. The new state becomes - * the current state. This function will allocate the stack - * if necessary. - * @param new_buffer The new state. - * - */ -void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) -{ - if (new_buffer == NULL) - return; - - yyensure_buffer_stack(); - - /* This block is copied from yy_switch_to_buffer. */ - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *(yy_c_buf_p) = (yy_hold_char); - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - (yy_buffer_stack_top)++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from yy_switch_to_buffer. */ - yy_load_buffer_state( ); - (yy_did_buffer_switch_on_eof) = 1; -} - -/** Removes and deletes the top of the stack, if present. - * The next element becomes the new top. - * - */ -void yypop_buffer_state (void) -{ - if (!YY_CURRENT_BUFFER) - return; - - yy_delete_buffer(YY_CURRENT_BUFFER ); - YY_CURRENT_BUFFER_LVALUE = NULL; - if ((yy_buffer_stack_top) > 0) - --(yy_buffer_stack_top); - - if (YY_CURRENT_BUFFER) { - yy_load_buffer_state( ); - (yy_did_buffer_switch_on_eof) = 1; + if ( b == yy_current_buffer ) + yy_load_buffer_state(); } -} -/* Allocates the stack if it does not exist. - * Guarantees space for at least one push. - */ -static void yyensure_buffer_stack (void) -{ - int num_to_alloc; - - if (!(yy_buffer_stack)) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; - (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - ); - - memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - - (yy_buffer_stack_max) = num_to_alloc; - (yy_buffer_stack_top) = 0; - return; - } - - if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ - - /* Increase the buffer to prepare for a possible push. */ - int grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = (yy_buffer_stack_max) + grow_size; - (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc - ((yy_buffer_stack), - num_to_alloc * sizeof(struct yy_buffer_state*) - ); - - /* zero only the new slots.*/ - memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); - (yy_buffer_stack_max) = num_to_alloc; - } -} -/** Setup the input buffer state to scan directly from a user-specified character buffer. - * @param base the character buffer - * @param size the size in bytes of the character buffer - * - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) -{ +#ifndef YY_NO_SCAN_BUFFER +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) +#else +YY_BUFFER_STATE yy_scan_buffer( base, size ) +char *base; +yy_size_t size; +#endif + { YY_BUFFER_STATE b; - + if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; - b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); + b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); @@ -1520,51 +1404,56 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; - yy_switch_to_buffer(b ); + yy_switch_to_buffer( b ); return b; -} + } +#endif -/** Setup the input buffer state to scan a string. The next call to yylex() will - * scan from a @e copy of @a str. - * @param str a NUL-terminated string to scan - * - * @return the newly allocated buffer state object. - * @note If you want to scan bytes that may contain NUL values, then use - * yy_scan_bytes() instead. - */ -YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) -{ - - return yy_scan_bytes(yystr,strlen(yystr) ); -} -/** Setup the input buffer state to scan the given bytes. The next call to yylex() will - * scan from a @e copy of @a bytes. - * @param bytes the byte buffer to scan - * @param len the number of bytes in the buffer pointed to by @a bytes. - * - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) -{ +#ifndef YY_NO_SCAN_STRING +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) +#else +YY_BUFFER_STATE yy_scan_string( yy_str ) +yyconst char *yy_str; +#endif + { + int len; + for ( len = 0; yy_str[len]; ++len ) + ; + + return yy_scan_bytes( yy_str, len ); + } +#endif + + +#ifndef YY_NO_SCAN_BYTES +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) +#else +YY_BUFFER_STATE yy_scan_bytes( bytes, len ) +yyconst char *bytes; +int len; +#endif + { YY_BUFFER_STATE b; char *buf; yy_size_t n; int i; - + /* Get memory for full buffer, including space for trailing EOB's. */ - n = _yybytes_len + 2; - buf = (char *) yyalloc(n ); + n = len + 2; + buf = (char *) yy_flex_alloc( n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); - for ( i = 0; i < _yybytes_len; ++i ) - buf[i] = yybytes[i]; + for ( i = 0; i < len; ++i ) + buf[i] = bytes[i]; - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; - b = yy_scan_buffer(buf,n ); + b = yy_scan_buffer( buf, n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); @@ -1574,196 +1463,148 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) b->yy_is_our_buffer = 1; return b; -} - -#ifndef YY_EXIT_FAILURE -#define YY_EXIT_FAILURE 2 + } #endif -static void yy_fatal_error (yyconst char* msg ) -{ - (void) fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); -} -/* Redefine yyless() so it works in section 3 code. */ - -#undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - yytext[yyleng] = (yy_hold_char); \ - (yy_c_buf_p) = yytext + yyless_macro_arg; \ - (yy_hold_char) = *(yy_c_buf_p); \ - *(yy_c_buf_p) = '\0'; \ - yyleng = yyless_macro_arg; \ - } \ - while ( 0 ) +#ifndef YY_NO_PUSH_STATE +#ifdef YY_USE_PROTOS +static void yy_push_state( int new_state ) +#else +static void yy_push_state( new_state ) +int new_state; +#endif + { + if ( yy_start_stack_ptr >= yy_start_stack_depth ) + { + yy_size_t new_size; -/* Accessor methods (get/set functions) to struct members. */ + yy_start_stack_depth += YY_START_STACK_INCR; + new_size = yy_start_stack_depth * sizeof( int ); -/** Get the current line number. - * - */ -int yyget_lineno (void) -{ - - return yylineno; -} + if ( ! yy_start_stack ) + yy_start_stack = (int *) yy_flex_alloc( new_size ); -/** Get the input stream. - * - */ -FILE *yyget_in (void) -{ - return yyin; -} + else + yy_start_stack = (int *) yy_flex_realloc( + (void *) yy_start_stack, new_size ); -/** Get the output stream. - * - */ -FILE *yyget_out (void) -{ - return yyout; -} + if ( ! yy_start_stack ) + YY_FATAL_ERROR( + "out of memory expanding start-condition stack" ); + } -/** Get the length of the current token. - * - */ -int yyget_leng (void) -{ - return yyleng; -} + yy_start_stack[yy_start_stack_ptr++] = YY_START; -/** Get the current token. - * - */ + BEGIN(new_state); + } +#endif -char *yyget_text (void) -{ - return yytext; -} -/** Set the current line number. - * @param line_number - * - */ -void yyset_lineno (int line_number ) -{ - - yylineno = line_number; -} +#ifndef YY_NO_POP_STATE +static void yy_pop_state() + { + if ( --yy_start_stack_ptr < 0 ) + YY_FATAL_ERROR( "start-condition stack underflow" ); -/** Set the input stream. This does not discard the current - * input buffer. - * @param in_str A readable stream. - * - * @see yy_switch_to_buffer - */ -void yyset_in (FILE * in_str ) -{ - yyin = in_str ; -} + BEGIN(yy_start_stack[yy_start_stack_ptr]); + } +#endif -void yyset_out (FILE * out_str ) -{ - yyout = out_str ; -} -int yyget_debug (void) -{ - return yy_flex_debug; -} +#ifndef YY_NO_TOP_STATE +static int yy_top_state() + { + return yy_start_stack[yy_start_stack_ptr - 1]; + } +#endif -void yyset_debug (int bdebug ) -{ - yy_flex_debug = bdebug ; -} +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif -static int yy_init_globals (void) -{ - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from yylex_destroy(), so don't allocate here. - */ - - (yy_buffer_stack) = 0; - (yy_buffer_stack_top) = 0; - (yy_buffer_stack_max) = 0; - (yy_c_buf_p) = (char *) 0; - (yy_init) = 0; - (yy_start) = 0; - -/* Defined in main.c */ -#ifdef YY_STDINIT - yyin = stdin; - yyout = stdout; +#ifdef YY_USE_PROTOS +static void yy_fatal_error( yyconst char msg[] ) #else - yyin = (FILE *) 0; - yyout = (FILE *) 0; +static void yy_fatal_error( msg ) +char msg[]; #endif + { + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); + } - /* For future reference: Set errno on error, since we are called by - * yylex_init() - */ - return 0; -} -/* yylex_destroy is for both reentrant and non-reentrant scanners. */ -int yylex_destroy (void) -{ - - /* Pop the buffer stack, destroying each element. */ - while(YY_CURRENT_BUFFER){ - yy_delete_buffer(YY_CURRENT_BUFFER ); - YY_CURRENT_BUFFER_LVALUE = NULL; - yypop_buffer_state(); - } - /* Destroy the stack itself. */ - yyfree((yy_buffer_stack) ); - (yy_buffer_stack) = NULL; +/* Redefine yyless() so it works in section 3 code. */ - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * yylex() is called, initialization will occur. */ - yy_init_globals( ); +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + yytext[yyleng] = yy_hold_char; \ + yy_c_buf_p = yytext + n; \ + yy_hold_char = *yy_c_buf_p; \ + *yy_c_buf_p = '\0'; \ + yyleng = n; \ + } \ + while ( 0 ) - return 0; -} -/* - * Internal utility routines. - */ +/* Internal utility routines. */ #ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) -{ +#ifdef YY_USE_PROTOS +static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) +#else +static void yy_flex_strncpy( s1, s2, n ) +char *s1; +yyconst char *s2; +int n; +#endif + { register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; -} + } #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * s ) -{ +#ifdef YY_USE_PROTOS +static int yy_flex_strlen( yyconst char *s ) +#else +static int yy_flex_strlen( s ) +yyconst char *s; +#endif + { register int n; for ( n = 0; s[n]; ++n ) ; return n; -} + } #endif -void *yyalloc (yy_size_t size ) -{ + +#ifdef YY_USE_PROTOS +static void *yy_flex_alloc( yy_size_t size ) +#else +static void *yy_flex_alloc( size ) +yy_size_t size; +#endif + { return (void *) malloc( size ); -} + } -void *yyrealloc (void * ptr, yy_size_t size ) -{ +#ifdef YY_USE_PROTOS +static void *yy_flex_realloc( void *ptr, yy_size_t size ) +#else +static void *yy_flex_realloc( ptr, size ) +void *ptr; +yy_size_t size; +#endif + { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter @@ -1772,19 +1613,28 @@ void *yyrealloc (void * ptr, yy_size_t size ) * as though doing an assignment. */ return (void *) realloc( (char *) ptr, size ); -} - -void yyfree (void * ptr ) -{ - free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ -} + } -#define YYTABLES_NAME "yytables" +#ifdef YY_USE_PROTOS +static void yy_flex_free( void *ptr ) +#else +static void yy_flex_free( ptr ) +void *ptr; +#endif + { + free( ptr ); + } +#if YY_MAIN +int main() + { + yylex(); + return 0; + } +#endif #line 98 "pool_config.l" - int pool_init_config(void) { int res; @@ -1818,6 +1668,7 @@ int pool_init_config(void) pool_config->num_init_children = 32; pool_config->max_pool = 4; pool_config->child_life_time = 300; + pool_config->child_idle_limit = 0; pool_config->connection_life_time = 0; pool_config->child_max_connections = 0; pool_config->logdir = DEFAULT_LOGDIR; @@ -2021,7 +1872,7 @@ int pool_get_config(char *confpath, POOL_CONFIG_CONTEXT context) if (token != POOL_INTEGER || v < 0) { - pool_error("pool_config: %s must be equal or higher than 0 numeric value", key); + pool_error("pool_config: %s must be equal or greater or equal to 0 numeric value", key); fclose(fd); return(-1); } @@ -2046,12 +1897,25 @@ int pool_get_config(char *confpath, POOL_CONFIG_CONTEXT context) if (token != POOL_INTEGER || v < 0) { - pool_error("pool_config: %s must be higher than 0 numeric value", key); + pool_error("pool_config: %s must be greater or equal to 0 numeric value", key); fclose(fd); return(-1); } pool_config->child_life_time = v; } + else if (!strcmp(key, "child_idle_limit") && + CHECK_CONTEXT(INIT_CONFIG|RELOAD_CONFIG, context)) + { + int v = atoi(yytext); + + if (token != POOL_INTEGER || v < 0) + { + pool_error("pool_config: %s must be greater or equal to 0 numeric value", key); + fclose(fd); + return(-1); + } + pool_config->child_idle_limit = v; + } else if (!strcmp(key, "connection_life_time") && CHECK_CONTEXT(INIT_CONFIG|RELOAD_CONFIG, context)) { @@ -2059,7 +1923,7 @@ int pool_get_config(char *confpath, POOL_CONFIG_CONTEXT context) if (token != POOL_INTEGER || v < 0) { - pool_error("pool_config: %s must be higher than 0 numeric value", key); + pool_error("pool_config: %s must be greater or equal to 0 numeric value", key); fclose(fd); return(-1); } @@ -2072,7 +1936,7 @@ int pool_get_config(char *confpath, POOL_CONFIG_CONTEXT context) if (token != POOL_INTEGER || v < 0) { - pool_error("pool_config: %s must be higher than 0 numeric value", key); + pool_error("pool_config: %s must be greater or equal to 0 numeric value", key); fclose(fd); return(-1); } @@ -2084,7 +1948,7 @@ int pool_get_config(char *confpath, POOL_CONFIG_CONTEXT context) if (token != POOL_INTEGER || v < 0) { - pool_error("pool_config: %s must be higher than 0 numeric value", key); + pool_error("pool_config: %s must be greater or equal to 0 numeric value", key); fclose(fd); return(-1); } @@ -2204,7 +2068,7 @@ int pool_get_config(char *confpath, POOL_CONFIG_CONTEXT context) if (token != POOL_INTEGER || v < 0) { - pool_error("pool_config: %s must be higher than 0 numeric value", key); + pool_error("pool_config: %s must be greater or equal to 0 numeric value", key); fclose(fd); return(-1); } @@ -2943,4 +2807,3 @@ static void print_host_entry(int slot) } #endif - diff --git a/pool_config.l b/pool_config.l index b4a8ad164..8e18a4c74 100644 --- a/pool_config.l +++ b/pool_config.l @@ -130,6 +130,7 @@ int pool_init_config(void) pool_config->num_init_children = 32; pool_config->max_pool = 4; pool_config->child_life_time = 300; + pool_config->child_idle_limit = 0; pool_config->connection_life_time = 0; pool_config->child_max_connections = 0; pool_config->logdir = DEFAULT_LOGDIR; @@ -333,7 +334,7 @@ int pool_get_config(char *confpath, POOL_CONFIG_CONTEXT context) if (token != POOL_INTEGER || v < 0) { - pool_error("pool_config: %s must be equal or higher than 0 numeric value", key); + pool_error("pool_config: %s must be equal or greater or equal to 0 numeric value", key); fclose(fd); return(-1); } @@ -358,12 +359,25 @@ int pool_get_config(char *confpath, POOL_CONFIG_CONTEXT context) if (token != POOL_INTEGER || v < 0) { - pool_error("pool_config: %s must be higher than 0 numeric value", key); + pool_error("pool_config: %s must be greater or equal to 0 numeric value", key); fclose(fd); return(-1); } pool_config->child_life_time = v; } + else if (!strcmp(key, "child_idle_limit") && + CHECK_CONTEXT(INIT_CONFIG|RELOAD_CONFIG, context)) + { + int v = atoi(yytext); + + if (token != POOL_INTEGER || v < 0) + { + pool_error("pool_config: %s must be greater or equal to 0 numeric value", key); + fclose(fd); + return(-1); + } + pool_config->child_idle_limit = v; + } else if (!strcmp(key, "connection_life_time") && CHECK_CONTEXT(INIT_CONFIG|RELOAD_CONFIG, context)) { @@ -371,7 +385,7 @@ int pool_get_config(char *confpath, POOL_CONFIG_CONTEXT context) if (token != POOL_INTEGER || v < 0) { - pool_error("pool_config: %s must be higher than 0 numeric value", key); + pool_error("pool_config: %s must be greater or equal to 0 numeric value", key); fclose(fd); return(-1); } @@ -384,7 +398,7 @@ int pool_get_config(char *confpath, POOL_CONFIG_CONTEXT context) if (token != POOL_INTEGER || v < 0) { - pool_error("pool_config: %s must be higher than 0 numeric value", key); + pool_error("pool_config: %s must be greater or equal to 0 numeric value", key); fclose(fd); return(-1); } @@ -396,7 +410,7 @@ int pool_get_config(char *confpath, POOL_CONFIG_CONTEXT context) if (token != POOL_INTEGER || v < 0) { - pool_error("pool_config: %s must be higher than 0 numeric value", key); + pool_error("pool_config: %s must be greater or equal to 0 numeric value", key); fclose(fd); return(-1); } @@ -516,7 +530,7 @@ int pool_get_config(char *confpath, POOL_CONFIG_CONTEXT context) if (token != POOL_INTEGER || v < 0) { - pool_error("pool_config: %s must be higher than 0 numeric value", key); + pool_error("pool_config: %s must be greater or equal to 0 numeric value", key); fclose(fd); return(-1); } diff --git a/pool_process_query.c b/pool_process_query.c index 905827d15..96996edb9 100644 --- a/pool_process_query.c +++ b/pool_process_query.c @@ -285,8 +285,18 @@ POOL_STATUS pool_process_query(POOL_CONNECTION *frontend, struct timeval timeout; int num_fds, was_error = 0; - timeout.tv_sec = 1; - timeout.tv_usec = 0; + /* + * frontend idle counter. depends on the following + * select(2) call's time out is 1 second. + */ + int frontend_idle_count = 0; + + SELECT_RETRY: + if (pool_config->child_idle_limit > 0) + { + timeout.tv_sec = 1; + timeout.tv_usec = 0; + } FD_ZERO(&readmask); FD_ZERO(&writemask); @@ -321,9 +331,15 @@ POOL_STATUS pool_process_query(POOL_CONNECTION *frontend, num_fds = Max(frontend->fd + 1, num_fds); } + /* pool_debug("pool_process_query: num_fds: %d", num_fds); + */ + + if (pool_config->child_idle_limit == 0) + fds = select(num_fds, &readmask, &writemask, &exceptmask, NULL); + else + fds = select(num_fds, &readmask, &writemask, &exceptmask, &timeout); - fds = select(num_fds, &readmask, &writemask, &exceptmask, NULL); if (fds == -1) { if (errno == EINTR) @@ -333,9 +349,16 @@ POOL_STATUS pool_process_query(POOL_CONNECTION *frontend, return POOL_ERROR; } - if (fds == 0) + if (pool_config->child_idle_limit > 0 && fds == 0) { - return POOL_CONTINUE; + frontend_idle_count++; + if (frontend_idle_count > pool_config->child_idle_limit) + { + pool_debug("pool_process_query: child connection forced to terminate due to child_idle_limit(%d) reached", pool_config->child_idle_limit); + return POOL_END; + } + + goto SELECT_RETRY; } for (i = 0; i < NUM_BACKENDS; i++) [parent: c7a7f22c0dd1]