LCOV - code coverage report
Current view: top level - src/backend/replication - repl_gram.c (source / functions) Hit Total Coverage
Test: PostgreSQL 14devel Lines: 151 222 68.0 %
Date: 2020-11-27 12:05:55 Functions: 2 2 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* A Bison parser, made by GNU Bison 3.3.2.  */
       2             : 
       3             : /* Bison implementation for Yacc-like parsers in C
       4             : 
       5             :    Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation,
       6             :    Inc.
       7             : 
       8             :    This program is free software: you can redistribute it and/or modify
       9             :    it under the terms of the GNU General Public License as published by
      10             :    the Free Software Foundation, either version 3 of the License, or
      11             :    (at your option) any later version.
      12             : 
      13             :    This program is distributed in the hope that it will be useful,
      14             :    but WITHOUT ANY WARRANTY; without even the implied warranty of
      15             :    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      16             :    GNU General Public License for more details.
      17             : 
      18             :    You should have received a copy of the GNU General Public License
      19             :    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
      20             : 
      21             : /* As a special exception, you may create a larger work that contains
      22             :    part or all of the Bison parser skeleton and distribute that work
      23             :    under terms of your choice, so long as that work isn't itself a
      24             :    parser generator using the skeleton or a modified version thereof
      25             :    as a parser skeleton.  Alternatively, if you modify or redistribute
      26             :    the parser skeleton itself, you may (at your option) remove this
      27             :    special exception, which will cause the skeleton and the resulting
      28             :    Bison output files to be licensed under the GNU General Public
      29             :    License without this special exception.
      30             : 
      31             :    This special exception was added by the Free Software Foundation in
      32             :    version 2.2 of Bison.  */
      33             : 
      34             : /* C LALR(1) parser skeleton written by Richard Stallman, by
      35             :    simplifying the original so-called "semantic" parser.  */
      36             : 
      37             : /* All symbols defined below should begin with yy or YY, to avoid
      38             :    infringing on user name space.  This should be done even for local
      39             :    variables, as they might otherwise be expanded by user macros.
      40             :    There are some unavoidable exceptions within include files to
      41             :    define necessary library symbols; they are noted "INFRINGES ON
      42             :    USER NAME SPACE" below.  */
      43             : 
      44             : /* Undocumented macros, especially those whose name start with YY_,
      45             :    are private implementation details.  Do not rely on them.  */
      46             : 
      47             : /* Identify Bison output.  */
      48             : #define YYBISON 1
      49             : 
      50             : /* Bison version.  */
      51             : #define YYBISON_VERSION "3.3.2"
      52             : 
      53             : /* Skeleton name.  */
      54             : #define YYSKELETON_NAME "yacc.c"
      55             : 
      56             : /* Pure parsers.  */
      57             : #define YYPURE 0
      58             : 
      59             : /* Push parsers.  */
      60             : #define YYPUSH 0
      61             : 
      62             : /* Pull parsers.  */
      63             : #define YYPULL 1
      64             : 
      65             : 
      66             : /* Substitute the variable and function names.  */
      67             : #define yyparse         replication_yyparse
      68             : #define yylex           replication_yylex
      69             : #define yyerror         replication_yyerror
      70             : #define yydebug         replication_yydebug
      71             : #define yynerrs         replication_yynerrs
      72             : 
      73             : #define yylval          replication_yylval
      74             : #define yychar          replication_yychar
      75             : 
      76             : /* First part of user prologue.  */
      77             : #line 1 "repl_gram.y" /* yacc.c:337  */
      78             : 
      79             : /*-------------------------------------------------------------------------
      80             :  *
      81             :  * repl_gram.y              - Parser for the replication commands
      82             :  *
      83             :  * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group
      84             :  * Portions Copyright (c) 1994, Regents of the University of California
      85             :  *
      86             :  *
      87             :  * IDENTIFICATION
      88             :  *    src/backend/replication/repl_gram.y
      89             :  *
      90             :  *-------------------------------------------------------------------------
      91             :  */
      92             : 
      93             : #include "postgres.h"
      94             : 
      95             : #include "access/xlogdefs.h"
      96             : #include "nodes/makefuncs.h"
      97             : #include "nodes/replnodes.h"
      98             : #include "replication/walsender.h"
      99             : #include "replication/walsender_private.h"
     100             : 
     101             : 
     102             : /* Result of the parsing is returned here */
     103             : Node *replication_parse_result;
     104             : 
     105             : static SQLCmd *make_sqlcmd(void);
     106             : 
     107             : 
     108             : /*
     109             :  * Bison doesn't allocate anything that needs to live across parser calls,
     110             :  * so we can easily have it use palloc instead of malloc.  This prevents
     111             :  * memory leaks if we error out during parsing.  Note this only works with
     112             :  * bison >= 2.0.  However, in bison 1.875 the default is to use alloca()
     113             :  * if possible, so there's not really much problem anyhow, at least if
     114             :  * you're building with gcc.
     115             :  */
     116             : #define YYMALLOC palloc
     117             : #define YYFREE   pfree
     118             : 
     119             : 
     120             : #line 121 "repl_gram.c" /* yacc.c:337  */
     121             : # ifndef YY_NULLPTR
     122             : #  if defined __cplusplus
     123             : #   if 201103L <= __cplusplus
     124             : #    define YY_NULLPTR nullptr
     125             : #   else
     126             : #    define YY_NULLPTR 0
     127             : #   endif
     128             : #  else
     129             : #   define YY_NULLPTR ((void*)0)
     130             : #  endif
     131             : # endif
     132             : 
     133             : /* Enabling verbose error messages.  */
     134             : #ifdef YYERROR_VERBOSE
     135             : # undef YYERROR_VERBOSE
     136             : # define YYERROR_VERBOSE 1
     137             : #else
     138             : # define YYERROR_VERBOSE 0
     139             : #endif
     140             : 
     141             : 
     142             : /* Debug traces.  */
     143             : #ifndef YYDEBUG
     144             : # define YYDEBUG 0
     145             : #endif
     146             : #if YYDEBUG
     147             : extern int replication_yydebug;
     148             : #endif
     149             : 
     150             : /* Token type.  */
     151             : #ifndef YYTOKENTYPE
     152             : # define YYTOKENTYPE
     153             :   enum yytokentype
     154             :   {
     155             :     SCONST = 258,
     156             :     IDENT = 259,
     157             :     UCONST = 260,
     158             :     RECPTR = 261,
     159             :     T_WORD = 262,
     160             :     K_BASE_BACKUP = 263,
     161             :     K_IDENTIFY_SYSTEM = 264,
     162             :     K_SHOW = 265,
     163             :     K_START_REPLICATION = 266,
     164             :     K_CREATE_REPLICATION_SLOT = 267,
     165             :     K_DROP_REPLICATION_SLOT = 268,
     166             :     K_TIMELINE_HISTORY = 269,
     167             :     K_LABEL = 270,
     168             :     K_PROGRESS = 271,
     169             :     K_FAST = 272,
     170             :     K_WAIT = 273,
     171             :     K_NOWAIT = 274,
     172             :     K_MAX_RATE = 275,
     173             :     K_WAL = 276,
     174             :     K_TABLESPACE_MAP = 277,
     175             :     K_NOVERIFY_CHECKSUMS = 278,
     176             :     K_TIMELINE = 279,
     177             :     K_PHYSICAL = 280,
     178             :     K_LOGICAL = 281,
     179             :     K_SLOT = 282,
     180             :     K_RESERVE_WAL = 283,
     181             :     K_TEMPORARY = 284,
     182             :     K_EXPORT_SNAPSHOT = 285,
     183             :     K_NOEXPORT_SNAPSHOT = 286,
     184             :     K_USE_SNAPSHOT = 287,
     185             :     K_MANIFEST = 288,
     186             :     K_MANIFEST_CHECKSUMS = 289
     187             :   };
     188             : #endif
     189             : 
     190             : /* Value type.  */
     191             : #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
     192             : 
     193             : union YYSTYPE
     194             : {
     195             : #line 47 "repl_gram.y" /* yacc.c:352  */
     196             : 
     197             :         char                    *str;
     198             :         bool                    boolval;
     199             :         uint32                  uintval;
     200             : 
     201             :         XLogRecPtr              recptr;
     202             :         Node                    *node;
     203             :         List                    *list;
     204             :         DefElem                 *defelt;
     205             : 
     206             : #line 207 "repl_gram.c" /* yacc.c:352  */
     207             : };
     208             : 
     209             : typedef union YYSTYPE YYSTYPE;
     210             : # define YYSTYPE_IS_TRIVIAL 1
     211             : # define YYSTYPE_IS_DECLARED 1
     212             : #endif
     213             : 
     214             : 
     215             : extern YYSTYPE replication_yylval;
     216             : 
     217             : int replication_yyparse (void);
     218             : 
     219             : 
     220             : 
     221             : 
     222             : 
     223             : #ifdef short
     224             : # undef short
     225             : #endif
     226             : 
     227             : #ifdef YYTYPE_UINT8
     228             : typedef YYTYPE_UINT8 yytype_uint8;
     229             : #else
     230             : typedef unsigned char yytype_uint8;
     231             : #endif
     232             : 
     233             : #ifdef YYTYPE_INT8
     234             : typedef YYTYPE_INT8 yytype_int8;
     235             : #else
     236             : typedef signed char yytype_int8;
     237             : #endif
     238             : 
     239             : #ifdef YYTYPE_UINT16
     240             : typedef YYTYPE_UINT16 yytype_uint16;
     241             : #else
     242             : typedef unsigned short yytype_uint16;
     243             : #endif
     244             : 
     245             : #ifdef YYTYPE_INT16
     246             : typedef YYTYPE_INT16 yytype_int16;
     247             : #else
     248             : typedef short yytype_int16;
     249             : #endif
     250             : 
     251             : #ifndef YYSIZE_T
     252             : # ifdef __SIZE_TYPE__
     253             : #  define YYSIZE_T __SIZE_TYPE__
     254             : # elif defined size_t
     255             : #  define YYSIZE_T size_t
     256             : # elif ! defined YYSIZE_T
     257             : #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
     258             : #  define YYSIZE_T size_t
     259             : # else
     260             : #  define YYSIZE_T unsigned
     261             : # endif
     262             : #endif
     263             : 
     264             : #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
     265             : 
     266             : #ifndef YY_
     267             : # if defined YYENABLE_NLS && YYENABLE_NLS
     268             : #  if ENABLE_NLS
     269             : #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
     270             : #   define YY_(Msgid) dgettext ("bison-runtime", Msgid)
     271             : #  endif
     272             : # endif
     273             : # ifndef YY_
     274             : #  define YY_(Msgid) Msgid
     275             : # endif
     276             : #endif
     277             : 
     278             : #ifndef YY_ATTRIBUTE
     279             : # if (defined __GNUC__                                               \
     280             :       && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__)))  \
     281             :      || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
     282             : #  define YY_ATTRIBUTE(Spec) __attribute__(Spec)
     283             : # else
     284             : #  define YY_ATTRIBUTE(Spec) /* empty */
     285             : # endif
     286             : #endif
     287             : 
     288             : #ifndef YY_ATTRIBUTE_PURE
     289             : # define YY_ATTRIBUTE_PURE   YY_ATTRIBUTE ((__pure__))
     290             : #endif
     291             : 
     292             : #ifndef YY_ATTRIBUTE_UNUSED
     293             : # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
     294             : #endif
     295             : 
     296             : /* Suppress unused-variable warnings by "using" E.  */
     297             : #if ! defined lint || defined __GNUC__
     298             : # define YYUSE(E) ((void) (E))
     299             : #else
     300             : # define YYUSE(E) /* empty */
     301             : #endif
     302             : 
     303             : #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
     304             : /* Suppress an incorrect diagnostic about yylval being uninitialized.  */
     305             : # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
     306             :     _Pragma ("GCC diagnostic push") \
     307             :     _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
     308             :     _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
     309             : # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
     310             :     _Pragma ("GCC diagnostic pop")
     311             : #else
     312             : # define YY_INITIAL_VALUE(Value) Value
     313             : #endif
     314             : #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
     315             : # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
     316             : # define YY_IGNORE_MAYBE_UNINITIALIZED_END
     317             : #endif
     318             : #ifndef YY_INITIAL_VALUE
     319             : # define YY_INITIAL_VALUE(Value) /* Nothing. */
     320             : #endif
     321             : 
     322             : 
     323             : #if ! defined yyoverflow || YYERROR_VERBOSE
     324             : 
     325             : /* The parser invokes alloca or malloc; define the necessary symbols.  */
     326             : 
     327             : # ifdef YYSTACK_USE_ALLOCA
     328             : #  if YYSTACK_USE_ALLOCA
     329             : #   ifdef __GNUC__
     330             : #    define YYSTACK_ALLOC __builtin_alloca
     331             : #   elif defined __BUILTIN_VA_ARG_INCR
     332             : #    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
     333             : #   elif defined _AIX
     334             : #    define YYSTACK_ALLOC __alloca
     335             : #   elif defined _MSC_VER
     336             : #    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
     337             : #    define alloca _alloca
     338             : #   else
     339             : #    define YYSTACK_ALLOC alloca
     340             : #    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
     341             : #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
     342             :       /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
     343             : #     ifndef EXIT_SUCCESS
     344             : #      define EXIT_SUCCESS 0
     345             : #     endif
     346             : #    endif
     347             : #   endif
     348             : #  endif
     349             : # endif
     350             : 
     351             : # ifdef YYSTACK_ALLOC
     352             :    /* Pacify GCC's 'empty if-body' warning.  */
     353             : #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
     354             : #  ifndef YYSTACK_ALLOC_MAXIMUM
     355             :     /* The OS might guarantee only one guard page at the bottom of the stack,
     356             :        and a page size can be as small as 4096 bytes.  So we cannot safely
     357             :        invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
     358             :        to allow for a few compiler-allocated temporary stack slots.  */
     359             : #   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
     360             : #  endif
     361             : # else
     362             : #  define YYSTACK_ALLOC YYMALLOC
     363             : #  define YYSTACK_FREE YYFREE
     364             : #  ifndef YYSTACK_ALLOC_MAXIMUM
     365             : #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
     366             : #  endif
     367             : #  if (defined __cplusplus && ! defined EXIT_SUCCESS \
     368             :        && ! ((defined YYMALLOC || defined malloc) \
     369             :              && (defined YYFREE || defined free)))
     370             : #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
     371             : #   ifndef EXIT_SUCCESS
     372             : #    define EXIT_SUCCESS 0
     373             : #   endif
     374             : #  endif
     375             : #  ifndef YYMALLOC
     376             : #   define YYMALLOC malloc
     377             : #   if ! defined malloc && ! defined EXIT_SUCCESS
     378             : void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
     379             : #   endif
     380             : #  endif
     381             : #  ifndef YYFREE
     382             : #   define YYFREE free
     383             : #   if ! defined free && ! defined EXIT_SUCCESS
     384             : void free (void *); /* INFRINGES ON USER NAME SPACE */
     385             : #   endif
     386             : #  endif
     387             : # endif
     388             : #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
     389             : 
     390             : 
     391             : #if (! defined yyoverflow \
     392             :      && (! defined __cplusplus \
     393             :          || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
     394             : 
     395             : /* A type that is properly aligned for any stack member.  */
     396             : union yyalloc
     397             : {
     398             :   yytype_int16 yyss_alloc;
     399             :   YYSTYPE yyvs_alloc;
     400             : };
     401             : 
     402             : /* The size of the maximum gap between one aligned stack and the next.  */
     403             : # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
     404             : 
     405             : /* The size of an array large to enough to hold all stacks, each with
     406             :    N elements.  */
     407             : # define YYSTACK_BYTES(N) \
     408             :      ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
     409             :       + YYSTACK_GAP_MAXIMUM)
     410             : 
     411             : # define YYCOPY_NEEDED 1
     412             : 
     413             : /* Relocate STACK from its old location to the new one.  The
     414             :    local variables YYSIZE and YYSTACKSIZE give the old and new number of
     415             :    elements in the stack, and YYPTR gives the new location of the
     416             :    stack.  Advance YYPTR to a properly aligned location for the next
     417             :    stack.  */
     418             : # define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
     419             :     do                                                                  \
     420             :       {                                                                 \
     421             :         YYSIZE_T yynewbytes;                                            \
     422             :         YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
     423             :         Stack = &yyptr->Stack_alloc;                                    \
     424             :         yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
     425             :         yyptr += yynewbytes / sizeof (*yyptr);                          \
     426             :       }                                                                 \
     427             :     while (0)
     428             : 
     429             : #endif
     430             : 
     431             : #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
     432             : /* Copy COUNT objects from SRC to DST.  The source and destination do
     433             :    not overlap.  */
     434             : # ifndef YYCOPY
     435             : #  if defined __GNUC__ && 1 < __GNUC__
     436             : #   define YYCOPY(Dst, Src, Count) \
     437             :       __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
     438             : #  else
     439             : #   define YYCOPY(Dst, Src, Count)              \
     440             :       do                                        \
     441             :         {                                       \
     442             :           YYSIZE_T yyi;                         \
     443             :           for (yyi = 0; yyi < (Count); yyi++)   \
     444             :             (Dst)[yyi] = (Src)[yyi];            \
     445             :         }                                       \
     446             :       while (0)
     447             : #  endif
     448             : # endif
     449             : #endif /* !YYCOPY_NEEDED */
     450             : 
     451             : /* YYFINAL -- State number of the termination state.  */
     452             : #define YYFINAL  28
     453             : /* YYLAST -- Last index in YYTABLE.  */
     454             : #define YYLAST   53
     455             : 
     456             : /* YYNTOKENS -- Number of terminals.  */
     457             : #define YYNTOKENS  40
     458             : /* YYNNTS -- Number of nonterminals.  */
     459             : #define YYNNTS  26
     460             : /* YYNRULES -- Number of rules.  */
     461             : #define YYNRULES  59
     462             : /* YYNSTATES -- Number of states.  */
     463             : #define YYNSTATES  80
     464             : 
     465             : #define YYUNDEFTOK  2
     466             : #define YYMAXUTOK   289
     467             : 
     468             : /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
     469             :    as returned by yylex, with out-of-bounds checking.  */
     470             : #define YYTRANSLATE(YYX)                                                \
     471             :   ((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
     472             : 
     473             : /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
     474             :    as returned by yylex.  */
     475             : static const yytype_uint8 yytranslate[] =
     476             : {
     477             :        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     478             :        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     479             :        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     480             :        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     481             :       37,    38,     2,     2,    39,     2,    36,     2,     2,     2,
     482             :        2,     2,     2,     2,     2,     2,     2,     2,     2,    35,
     483             :        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     484             :        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     485             :        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     486             :        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     487             :        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     488             :        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     489             :        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     490             :        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     491             :        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     492             :        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     493             :        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     494             :        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     495             :        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     496             :        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     497             :        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     498             :        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     499             :        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     500             :        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     501             :        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     502             :        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
     503             :        5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
     504             :       15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
     505             :       25,    26,    27,    28,    29,    30,    31,    32,    33,    34
     506             : };
     507             : 
     508             : #if YYDEBUG
     509             :   /* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
     510             : static const yytype_uint16 yyrline[] =
     511             : {
     512             :        0,   110,   110,   116,   117,   121,   122,   123,   124,   125,
     513             :      126,   127,   128,   129,   136,   146,   153,   154,   164,   173,
     514             :      176,   180,   185,   190,   195,   200,   205,   210,   215,   220,
     515             :      225,   234,   245,   259,   262,   266,   271,   276,   281,   290,
     516             :      298,   312,   327,   342,   359,   360,   364,   365,   369,   372,
     517             :      376,   384,   389,   390,   394,   398,   405,   412,   413,   417
     518             : };
     519             : #endif
     520             : 
     521             : #if YYDEBUG || YYERROR_VERBOSE || 0
     522             : /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
     523             :    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
     524             : static const char *const yytname[] =
     525             : {
     526             :   "$end", "error", "$undefined", "SCONST", "IDENT", "UCONST", "RECPTR",
     527             :   "T_WORD", "K_BASE_BACKUP", "K_IDENTIFY_SYSTEM", "K_SHOW",
     528             :   "K_START_REPLICATION", "K_CREATE_REPLICATION_SLOT",
     529             :   "K_DROP_REPLICATION_SLOT", "K_TIMELINE_HISTORY", "K_LABEL", "K_PROGRESS",
     530             :   "K_FAST", "K_WAIT", "K_NOWAIT", "K_MAX_RATE", "K_WAL",
     531             :   "K_TABLESPACE_MAP", "K_NOVERIFY_CHECKSUMS", "K_TIMELINE", "K_PHYSICAL",
     532             :   "K_LOGICAL", "K_SLOT", "K_RESERVE_WAL", "K_TEMPORARY",
     533             :   "K_EXPORT_SNAPSHOT", "K_NOEXPORT_SNAPSHOT", "K_USE_SNAPSHOT",
     534             :   "K_MANIFEST", "K_MANIFEST_CHECKSUMS", "';'", "'.'", "'('", "')'", "','",
     535             :   "$accept", "firstcmd", "opt_semicolon", "command", "identify_system",
     536             :   "show", "var_name", "base_backup", "base_backup_opt_list",
     537             :   "base_backup_opt", "create_replication_slot", "create_slot_opt_list",
     538             :   "create_slot_opt", "drop_replication_slot", "start_replication",
     539             :   "start_logical_replication", "timeline_history", "opt_physical",
     540             :   "opt_temporary", "opt_slot", "opt_timeline", "plugin_options",
     541             :   "plugin_opt_list", "plugin_opt_elem", "plugin_opt_arg", "sql_cmd", YY_NULLPTR
     542             : };
     543             : #endif
     544             : 
     545             : # ifdef YYPRINT
     546             : /* YYTOKNUM[NUM] -- (External) token number corresponding to the
     547             :    (internal) symbol number NUM (which must be that of a token).  */
     548             : static const yytype_uint16 yytoknum[] =
     549             : {
     550             :        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
     551             :      265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
     552             :      275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
     553             :      285,   286,   287,   288,   289,    59,    46,    40,    41,    44
     554             : };
     555             : # endif
     556             : 
     557             : #define YYPACT_NINF -27
     558             : 
     559             : #define yypact_value_is_default(Yystate) \
     560             :   (!!((Yystate) == (-27)))
     561             : 
     562             : #define YYTABLE_NINF -1
     563             : 
     564             : #define yytable_value_is_error(Yytable_value) \
     565             :   0
     566             : 
     567             :   /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
     568             :      STATE-NUM.  */
     569             : static const yytype_int8 yypact[] =
     570             : {
     571             :       12,   -27,   -27,   -27,    -1,   -17,    13,    23,    25,    31,
     572             :       -3,   -27,   -27,   -27,   -27,   -27,   -27,   -27,   -27,   -27,
     573             :      -15,   -27,    -2,    29,    10,     7,    19,   -27,   -27,   -27,
     574             :      -27,    35,   -27,   -27,   -27,    34,   -27,   -27,   -27,    37,
     575             :       38,   -27,    39,    16,   -27,    40,   -27,   -11,   -27,   -27,
     576             :      -27,   -27,   -27,   -27,    41,    20,   -27,    44,     8,    45,
     577             :      -27,   -19,   -27,    47,   -27,   -27,   -27,   -27,   -27,   -27,
     578             :      -27,   -19,    46,   -10,   -27,   -27,   -27,   -27,    47,   -27
     579             : };
     580             : 
     581             :   /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
     582             :      Performed when YYTABLE does not specify something else to do.  Zero
     583             :      means the default is an error.  */
     584             : static const yytype_uint8 yydefact[] =
     585             : {
     586             :        0,    59,    20,    14,     0,    49,     0,     0,     0,     0,
     587             :        4,     5,    12,     6,     9,    10,     7,     8,    11,    13,
     588             :       18,    16,    15,     0,    45,    47,    39,    43,     1,     3,
     589             :        2,     0,    22,    23,    25,     0,    24,    27,    28,     0,
     590             :        0,    19,     0,    48,    44,     0,    46,     0,    40,    21,
     591             :       26,    29,    30,    17,     0,    51,    34,     0,    53,     0,
     592             :       41,    31,    34,     0,    42,    50,    38,    35,    36,    37,
     593             :       33,    32,    58,     0,    54,    57,    56,    52,     0,    55
     594             : };
     595             : 
     596             :   /* YYPGOTO[NTERM-NUM].  */
     597             : static const yytype_int8 yypgoto[] =
     598             : {
     599             :      -27,   -27,   -27,   -27,   -27,   -27,   -27,   -27,   -27,   -27,
     600             :      -27,    -9,   -27,   -27,   -27,   -27,   -27,   -27,   -27,   -27,
     601             :      -27,   -27,   -27,   -26,   -27,   -27
     602             : };
     603             : 
     604             :   /* YYDEFGOTO[NTERM-NUM].  */
     605             : static const yytype_int8 yydefgoto[] =
     606             : {
     607             :       -1,     9,    30,    10,    11,    12,    22,    13,    20,    41,
     608             :       14,    61,    70,    15,    16,    17,    18,    45,    47,    24,
     609             :       60,    64,    73,    74,    76,    19
     610             : };
     611             : 
     612             :   /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
     613             :      positive, shift that token.  If negative, reduce the rule whose
     614             :      number is the opposite.  If YYTABLE_NINF, syntax error.  */
     615             : static const yytype_uint8 yytable[] =
     616             : {
     617             :       31,    32,    33,    21,    34,    35,    36,    37,    38,    66,
     618             :       23,    67,    68,    69,    56,    57,     1,    25,    39,    40,
     619             :        2,     3,     4,     5,     6,     7,     8,    26,    77,    78,
     620             :       27,    28,    29,    43,    42,    44,    46,    48,    49,    50,
     621             :       51,    52,    54,    53,    59,    63,    55,    58,    62,    75,
     622             :       65,    72,    79,    71
     623             : };
     624             : 
     625             : static const yytype_uint8 yycheck[] =
     626             : {
     627             :       15,    16,    17,     4,    19,    20,    21,    22,    23,    28,
     628             :       27,    30,    31,    32,    25,    26,     4,     4,    33,    34,
     629             :        8,     9,    10,    11,    12,    13,    14,     4,    38,    39,
     630             :        5,     0,    35,     4,    36,    25,    29,    18,     3,     5,
     631             :        3,     3,    26,     4,    24,    37,     6,     6,     4,     3,
     632             :        5,     4,    78,    62
     633             : };
     634             : 
     635             :   /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
     636             :      symbol of state STATE-NUM.  */
     637             : static const yytype_uint8 yystos[] =
     638             : {
     639             :        0,     4,     8,     9,    10,    11,    12,    13,    14,    41,
     640             :       43,    44,    45,    47,    50,    53,    54,    55,    56,    65,
     641             :       48,     4,    46,    27,    59,     4,     4,     5,     0,    35,
     642             :       42,    15,    16,    17,    19,    20,    21,    22,    23,    33,
     643             :       34,    49,    36,     4,    25,    57,    29,    58,    18,     3,
     644             :        5,     3,     3,     4,    26,     6,    25,    26,     6,    24,
     645             :       60,    51,     4,    37,    61,     5,    28,    30,    31,    32,
     646             :       52,    51,     4,    62,    63,     3,    64,    38,    39,    63
     647             : };
     648             : 
     649             :   /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
     650             : static const yytype_uint8 yyr1[] =
     651             : {
     652             :        0,    40,    41,    42,    42,    43,    43,    43,    43,    43,
     653             :       43,    43,    43,    43,    44,    45,    46,    46,    47,    48,
     654             :       48,    49,    49,    49,    49,    49,    49,    49,    49,    49,
     655             :       49,    50,    50,    51,    51,    52,    52,    52,    52,    53,
     656             :       53,    54,    55,    56,    57,    57,    58,    58,    59,    59,
     657             :       60,    60,    61,    61,    62,    62,    63,    64,    64,    65
     658             : };
     659             : 
     660             :   /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN.  */
     661             : static const yytype_uint8 yyr2[] =
     662             : {
     663             :        0,     2,     2,     1,     0,     1,     1,     1,     1,     1,
     664             :        1,     1,     1,     1,     1,     2,     1,     3,     2,     2,
     665             :        0,     2,     1,     1,     1,     1,     2,     1,     1,     2,
     666             :        2,     5,     6,     2,     0,     1,     1,     1,     1,     2,
     667             :        3,     5,     6,     2,     1,     0,     1,     0,     2,     0,
     668             :        2,     0,     3,     0,     1,     3,     2,     1,     0,     1
     669             : };
     670             : 
     671             : 
     672             : #define yyerrok         (yyerrstatus = 0)
     673             : #define yyclearin       (yychar = YYEMPTY)
     674             : #define YYEMPTY         (-2)
     675             : #define YYEOF           0
     676             : 
     677             : #define YYACCEPT        goto yyacceptlab
     678             : #define YYABORT         goto yyabortlab
     679             : #define YYERROR         goto yyerrorlab
     680             : 
     681             : 
     682             : #define YYRECOVERING()  (!!yyerrstatus)
     683             : 
     684             : #define YYBACKUP(Token, Value)                                    \
     685             :   do                                                              \
     686             :     if (yychar == YYEMPTY)                                        \
     687             :       {                                                           \
     688             :         yychar = (Token);                                         \
     689             :         yylval = (Value);                                         \
     690             :         YYPOPSTACK (yylen);                                       \
     691             :         yystate = *yyssp;                                         \
     692             :         goto yybackup;                                            \
     693             :       }                                                           \
     694             :     else                                                          \
     695             :       {                                                           \
     696             :         yyerror (YY_("syntax error: cannot back up")); \
     697             :         YYERROR;                                                  \
     698             :       }                                                           \
     699             :   while (0)
     700             : 
     701             : /* Error token number */
     702             : #define YYTERROR        1
     703             : #define YYERRCODE       256
     704             : 
     705             : 
     706             : 
     707             : /* Enable debugging if requested.  */
     708             : #if YYDEBUG
     709             : 
     710             : # ifndef YYFPRINTF
     711             : #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
     712             : #  define YYFPRINTF fprintf
     713             : # endif
     714             : 
     715             : # define YYDPRINTF(Args)                        \
     716             : do {                                            \
     717             :   if (yydebug)                                  \
     718             :     YYFPRINTF Args;                             \
     719             : } while (0)
     720             : 
     721             : /* This macro is provided for backward compatibility. */
     722             : #ifndef YY_LOCATION_PRINT
     723             : # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
     724             : #endif
     725             : 
     726             : 
     727             : # define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
     728             : do {                                                                      \
     729             :   if (yydebug)                                                            \
     730             :     {                                                                     \
     731             :       YYFPRINTF (stderr, "%s ", Title);                                   \
     732             :       yy_symbol_print (stderr,                                            \
     733             :                   Type, Value); \
     734             :       YYFPRINTF (stderr, "\n");                                           \
     735             :     }                                                                     \
     736             : } while (0)
     737             : 
     738             : 
     739             : /*-----------------------------------.
     740             : | Print this symbol's value on YYO.  |
     741             : `-----------------------------------*/
     742             : 
     743             : static void
     744             : yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep)
     745             : {
     746             :   FILE *yyoutput = yyo;
     747             :   YYUSE (yyoutput);
     748             :   if (!yyvaluep)
     749             :     return;
     750             : # ifdef YYPRINT
     751             :   if (yytype < YYNTOKENS)
     752             :     YYPRINT (yyo, yytoknum[yytype], *yyvaluep);
     753             : # endif
     754             :   YYUSE (yytype);
     755             : }
     756             : 
     757             : 
     758             : /*---------------------------.
     759             : | Print this symbol on YYO.  |
     760             : `---------------------------*/
     761             : 
     762             : static void
     763             : yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep)
     764             : {
     765             :   YYFPRINTF (yyo, "%s %s (",
     766             :              yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
     767             : 
     768             :   yy_symbol_value_print (yyo, yytype, yyvaluep);
     769             :   YYFPRINTF (yyo, ")");
     770             : }
     771             : 
     772             : /*------------------------------------------------------------------.
     773             : | yy_stack_print -- Print the state stack from its BOTTOM up to its |
     774             : | TOP (included).                                                   |
     775             : `------------------------------------------------------------------*/
     776             : 
     777             : static void
     778             : yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
     779             : {
     780             :   YYFPRINTF (stderr, "Stack now");
     781             :   for (; yybottom <= yytop; yybottom++)
     782             :     {
     783             :       int yybot = *yybottom;
     784             :       YYFPRINTF (stderr, " %d", yybot);
     785             :     }
     786             :   YYFPRINTF (stderr, "\n");
     787             : }
     788             : 
     789             : # define YY_STACK_PRINT(Bottom, Top)                            \
     790             : do {                                                            \
     791             :   if (yydebug)                                                  \
     792             :     yy_stack_print ((Bottom), (Top));                           \
     793             : } while (0)
     794             : 
     795             : 
     796             : /*------------------------------------------------.
     797             : | Report that the YYRULE is going to be reduced.  |
     798             : `------------------------------------------------*/
     799             : 
     800             : static void
     801             : yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
     802             : {
     803             :   unsigned long yylno = yyrline[yyrule];
     804             :   int yynrhs = yyr2[yyrule];
     805             :   int yyi;
     806             :   YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
     807             :              yyrule - 1, yylno);
     808             :   /* The symbols being reduced.  */
     809             :   for (yyi = 0; yyi < yynrhs; yyi++)
     810             :     {
     811             :       YYFPRINTF (stderr, "   $%d = ", yyi + 1);
     812             :       yy_symbol_print (stderr,
     813             :                        yystos[yyssp[yyi + 1 - yynrhs]],
     814             :                        &yyvsp[(yyi + 1) - (yynrhs)]
     815             :                                               );
     816             :       YYFPRINTF (stderr, "\n");
     817             :     }
     818             : }
     819             : 
     820             : # define YY_REDUCE_PRINT(Rule)          \
     821             : do {                                    \
     822             :   if (yydebug)                          \
     823             :     yy_reduce_print (yyssp, yyvsp, Rule); \
     824             : } while (0)
     825             : 
     826             : /* Nonzero means print parse trace.  It is left uninitialized so that
     827             :    multiple parsers can coexist.  */
     828             : int yydebug;
     829             : #else /* !YYDEBUG */
     830             : # define YYDPRINTF(Args)
     831             : # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
     832             : # define YY_STACK_PRINT(Bottom, Top)
     833             : # define YY_REDUCE_PRINT(Rule)
     834             : #endif /* !YYDEBUG */
     835             : 
     836             : 
     837             : /* YYINITDEPTH -- initial size of the parser's stacks.  */
     838             : #ifndef YYINITDEPTH
     839             : # define YYINITDEPTH 200
     840             : #endif
     841             : 
     842             : /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
     843             :    if the built-in stack extension method is used).
     844             : 
     845             :    Do not make this value too large; the results are undefined if
     846             :    YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
     847             :    evaluated with infinite-precision integer arithmetic.  */
     848             : 
     849             : #ifndef YYMAXDEPTH
     850             : # define YYMAXDEPTH 10000
     851             : #endif
     852             : 
     853             : 
     854             : #if YYERROR_VERBOSE
     855             : 
     856             : # ifndef yystrlen
     857             : #  if defined __GLIBC__ && defined _STRING_H
     858             : #   define yystrlen strlen
     859             : #  else
     860             : /* Return the length of YYSTR.  */
     861             : static YYSIZE_T
     862             : yystrlen (const char *yystr)
     863             : {
     864             :   YYSIZE_T yylen;
     865             :   for (yylen = 0; yystr[yylen]; yylen++)
     866             :     continue;
     867             :   return yylen;
     868             : }
     869             : #  endif
     870             : # endif
     871             : 
     872             : # ifndef yystpcpy
     873             : #  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
     874             : #   define yystpcpy stpcpy
     875             : #  else
     876             : /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
     877             :    YYDEST.  */
     878             : static char *
     879             : yystpcpy (char *yydest, const char *yysrc)
     880             : {
     881             :   char *yyd = yydest;
     882             :   const char *yys = yysrc;
     883             : 
     884             :   while ((*yyd++ = *yys++) != '\0')
     885             :     continue;
     886             : 
     887             :   return yyd - 1;
     888             : }
     889             : #  endif
     890             : # endif
     891             : 
     892             : # ifndef yytnamerr
     893             : /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
     894             :    quotes and backslashes, so that it's suitable for yyerror.  The
     895             :    heuristic is that double-quoting is unnecessary unless the string
     896             :    contains an apostrophe, a comma, or backslash (other than
     897             :    backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
     898             :    null, do not copy; instead, return the length of what the result
     899             :    would have been.  */
     900             : static YYSIZE_T
     901             : yytnamerr (char *yyres, const char *yystr)
     902             : {
     903             :   if (*yystr == '"')
     904             :     {
     905             :       YYSIZE_T yyn = 0;
     906             :       char const *yyp = yystr;
     907             : 
     908             :       for (;;)
     909             :         switch (*++yyp)
     910             :           {
     911             :           case '\'':
     912             :           case ',':
     913             :             goto do_not_strip_quotes;
     914             : 
     915             :           case '\\':
     916             :             if (*++yyp != '\\')
     917             :               goto do_not_strip_quotes;
     918             :             else
     919             :               goto append;
     920             : 
     921             :           append:
     922             :           default:
     923             :             if (yyres)
     924             :               yyres[yyn] = *yyp;
     925             :             yyn++;
     926             :             break;
     927             : 
     928             :           case '"':
     929             :             if (yyres)
     930             :               yyres[yyn] = '\0';
     931             :             return yyn;
     932             :           }
     933             :     do_not_strip_quotes: ;
     934             :     }
     935             : 
     936             :   if (! yyres)
     937             :     return yystrlen (yystr);
     938             : 
     939             :   return (YYSIZE_T) (yystpcpy (yyres, yystr) - yyres);
     940             : }
     941             : # endif
     942             : 
     943             : /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
     944             :    about the unexpected token YYTOKEN for the state stack whose top is
     945             :    YYSSP.
     946             : 
     947             :    Return 0 if *YYMSG was successfully written.  Return 1 if *YYMSG is
     948             :    not large enough to hold the message.  In that case, also set
     949             :    *YYMSG_ALLOC to the required number of bytes.  Return 2 if the
     950             :    required number of bytes is too large to store.  */
     951             : static int
     952             : yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
     953             :                 yytype_int16 *yyssp, int yytoken)
     954             : {
     955             :   YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
     956             :   YYSIZE_T yysize = yysize0;
     957             :   enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
     958             :   /* Internationalized format string. */
     959             :   const char *yyformat = YY_NULLPTR;
     960             :   /* Arguments of yyformat. */
     961             :   char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
     962             :   /* Number of reported tokens (one for the "unexpected", one per
     963             :      "expected"). */
     964             :   int yycount = 0;
     965             : 
     966             :   /* There are many possibilities here to consider:
     967             :      - If this state is a consistent state with a default action, then
     968             :        the only way this function was invoked is if the default action
     969             :        is an error action.  In that case, don't check for expected
     970             :        tokens because there are none.
     971             :      - The only way there can be no lookahead present (in yychar) is if
     972             :        this state is a consistent state with a default action.  Thus,
     973             :        detecting the absence of a lookahead is sufficient to determine
     974             :        that there is no unexpected or expected token to report.  In that
     975             :        case, just report a simple "syntax error".
     976             :      - Don't assume there isn't a lookahead just because this state is a
     977             :        consistent state with a default action.  There might have been a
     978             :        previous inconsistent state, consistent state with a non-default
     979             :        action, or user semantic action that manipulated yychar.
     980             :      - Of course, the expected token list depends on states to have
     981             :        correct lookahead information, and it depends on the parser not
     982             :        to perform extra reductions after fetching a lookahead from the
     983             :        scanner and before detecting a syntax error.  Thus, state merging
     984             :        (from LALR or IELR) and default reductions corrupt the expected
     985             :        token list.  However, the list is correct for canonical LR with
     986             :        one exception: it will still contain any token that will not be
     987             :        accepted due to an error action in a later state.
     988             :   */
     989             :   if (yytoken != YYEMPTY)
     990             :     {
     991             :       int yyn = yypact[*yyssp];
     992             :       yyarg[yycount++] = yytname[yytoken];
     993             :       if (!yypact_value_is_default (yyn))
     994             :         {
     995             :           /* Start YYX at -YYN if negative to avoid negative indexes in
     996             :              YYCHECK.  In other words, skip the first -YYN actions for
     997             :              this state because they are default actions.  */
     998             :           int yyxbegin = yyn < 0 ? -yyn : 0;
     999             :           /* Stay within bounds of both yycheck and yytname.  */
    1000             :           int yychecklim = YYLAST - yyn + 1;
    1001             :           int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
    1002             :           int yyx;
    1003             : 
    1004             :           for (yyx = yyxbegin; yyx < yyxend; ++yyx)
    1005             :             if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
    1006             :                 && !yytable_value_is_error (yytable[yyx + yyn]))
    1007             :               {
    1008             :                 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
    1009             :                   {
    1010             :                     yycount = 1;
    1011             :                     yysize = yysize0;
    1012             :                     break;
    1013             :                   }
    1014             :                 yyarg[yycount++] = yytname[yyx];
    1015             :                 {
    1016             :                   YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
    1017             :                   if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
    1018             :                     yysize = yysize1;
    1019             :                   else
    1020             :                     return 2;
    1021             :                 }
    1022             :               }
    1023             :         }
    1024             :     }
    1025             : 
    1026             :   switch (yycount)
    1027             :     {
    1028             : # define YYCASE_(N, S)                      \
    1029             :       case N:                               \
    1030             :         yyformat = S;                       \
    1031             :       break
    1032             :     default: /* Avoid compiler warnings. */
    1033             :       YYCASE_(0, YY_("syntax error"));
    1034             :       YYCASE_(1, YY_("syntax error, unexpected %s"));
    1035             :       YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
    1036             :       YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
    1037             :       YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
    1038             :       YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
    1039             : # undef YYCASE_
    1040             :     }
    1041             : 
    1042             :   {
    1043             :     YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
    1044             :     if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
    1045             :       yysize = yysize1;
    1046             :     else
    1047             :       return 2;
    1048             :   }
    1049             : 
    1050             :   if (*yymsg_alloc < yysize)
    1051             :     {
    1052             :       *yymsg_alloc = 2 * yysize;
    1053             :       if (! (yysize <= *yymsg_alloc
    1054             :              && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
    1055             :         *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
    1056             :       return 1;
    1057             :     }
    1058             : 
    1059             :   /* Avoid sprintf, as that infringes on the user's name space.
    1060             :      Don't have undefined behavior even if the translation
    1061             :      produced a string with the wrong number of "%s"s.  */
    1062             :   {
    1063             :     char *yyp = *yymsg;
    1064             :     int yyi = 0;
    1065             :     while ((*yyp = *yyformat) != '\0')
    1066             :       if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
    1067             :         {
    1068             :           yyp += yytnamerr (yyp, yyarg[yyi++]);
    1069             :           yyformat += 2;
    1070             :         }
    1071             :       else
    1072             :         {
    1073             :           yyp++;
    1074             :           yyformat++;
    1075             :         }
    1076             :   }
    1077             :   return 0;
    1078             : }
    1079             : #endif /* YYERROR_VERBOSE */
    1080             : 
    1081             : /*-----------------------------------------------.
    1082             : | Release the memory associated to this symbol.  |
    1083             : `-----------------------------------------------*/
    1084             : 
    1085             : static void
    1086        5652 : yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
    1087             : {
    1088             :   YYUSE (yyvaluep);
    1089        5652 :   if (!yymsg)
    1090           0 :     yymsg = "Deleting";
    1091             :   YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
    1092             : 
    1093             :   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
    1094             :   YYUSE (yytype);
    1095             :   YY_IGNORE_MAYBE_UNINITIALIZED_END
    1096        5652 : }
    1097             : 
    1098             : 
    1099             : 
    1100             : 
    1101             : /* The lookahead symbol.  */
    1102             : int yychar;
    1103             : 
    1104             : /* The semantic value of the lookahead symbol.  */
    1105             : YYSTYPE yylval;
    1106             : /* Number of syntax errors so far.  */
    1107             : int yynerrs;
    1108             : 
    1109             : 
    1110             : /*----------.
    1111             : | yyparse.  |
    1112             : `----------*/
    1113             : 
    1114             : int
    1115        2826 : yyparse (void)
    1116             : {
    1117             :     int yystate;
    1118             :     /* Number of tokens to shift before error messages enabled.  */
    1119             :     int yyerrstatus;
    1120             : 
    1121             :     /* The stacks and their tools:
    1122             :        'yyss': related to states.
    1123             :        'yyvs': related to semantic values.
    1124             : 
    1125             :        Refer to the stacks through separate pointers, to allow yyoverflow
    1126             :        to reallocate them elsewhere.  */
    1127             : 
    1128             :     /* The state stack.  */
    1129             :     yytype_int16 yyssa[YYINITDEPTH];
    1130             :     yytype_int16 *yyss;
    1131             :     yytype_int16 *yyssp;
    1132             : 
    1133             :     /* The semantic value stack.  */
    1134             :     YYSTYPE yyvsa[YYINITDEPTH];
    1135             :     YYSTYPE *yyvs;
    1136             :     YYSTYPE *yyvsp;
    1137             : 
    1138             :     YYSIZE_T yystacksize;
    1139             : 
    1140             :   int yyn;
    1141             :   int yyresult;
    1142             :   /* Lookahead token as an internal (translated) token number.  */
    1143        2826 :   int yytoken = 0;
    1144             :   /* The variables used to return semantic value and location from the
    1145             :      action routines.  */
    1146             :   YYSTYPE yyval;
    1147             : 
    1148             : #if YYERROR_VERBOSE
    1149             :   /* Buffer for error messages, and its allocated size.  */
    1150             :   char yymsgbuf[128];
    1151             :   char *yymsg = yymsgbuf;
    1152             :   YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
    1153             : #endif
    1154             : 
    1155             : #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
    1156             : 
    1157             :   /* The number of symbols on the RHS of the reduced rule.
    1158             :      Keep to zero when no symbol should be popped.  */
    1159        2826 :   int yylen = 0;
    1160             : 
    1161        2826 :   yyssp = yyss = yyssa;
    1162        2826 :   yyvsp = yyvs = yyvsa;
    1163        2826 :   yystacksize = YYINITDEPTH;
    1164             : 
    1165             :   YYDPRINTF ((stderr, "Starting parse\n"));
    1166             : 
    1167        2826 :   yystate = 0;
    1168        2826 :   yyerrstatus = 0;
    1169        2826 :   yynerrs = 0;
    1170        2826 :   yychar = YYEMPTY; /* Cause a token to be read.  */
    1171        2826 :   goto yysetstate;
    1172             : 
    1173             : 
    1174             : /*------------------------------------------------------------.
    1175             : | yynewstate -- push a new state, which is found in yystate.  |
    1176             : `------------------------------------------------------------*/
    1177       28414 : yynewstate:
    1178             :   /* In all cases, when you get here, the value and location stacks
    1179             :      have just been pushed.  So pushing a state here evens the stacks.  */
    1180       28414 :   yyssp++;
    1181             : 
    1182             : 
    1183             : /*--------------------------------------------------------------------.
    1184             : | yynewstate -- set current state (the top of the stack) to yystate.  |
    1185             : `--------------------------------------------------------------------*/
    1186       31240 : yysetstate:
    1187       31240 :   *yyssp = (yytype_int16) yystate;
    1188             : 
    1189       31240 :   if (yyss + yystacksize - 1 <= yyssp)
    1190             : #if !defined yyoverflow && !defined YYSTACK_RELOCATE
    1191             :     goto yyexhaustedlab;
    1192             : #else
    1193             :     {
    1194             :       /* Get the current used size of the three stacks, in elements.  */
    1195           0 :       YYSIZE_T yysize = (YYSIZE_T) (yyssp - yyss + 1);
    1196             : 
    1197             : # if defined yyoverflow
    1198             :       {
    1199             :         /* Give user a chance to reallocate the stack.  Use copies of
    1200             :            these so that the &'s don't force the real ones into
    1201             :            memory.  */
    1202             :         YYSTYPE *yyvs1 = yyvs;
    1203             :         yytype_int16 *yyss1 = yyss;
    1204             : 
    1205             :         /* Each stack pointer address is followed by the size of the
    1206             :            data in use in that stack, in bytes.  This used to be a
    1207             :            conditional around just the two extra args, but that might
    1208             :            be undefined if yyoverflow is a macro.  */
    1209             :         yyoverflow (YY_("memory exhausted"),
    1210             :                     &yyss1, yysize * sizeof (*yyssp),
    1211             :                     &yyvs1, yysize * sizeof (*yyvsp),
    1212             :                     &yystacksize);
    1213             :         yyss = yyss1;
    1214             :         yyvs = yyvs1;
    1215             :       }
    1216             : # else /* defined YYSTACK_RELOCATE */
    1217             :       /* Extend the stack our own way.  */
    1218           0 :       if (YYMAXDEPTH <= yystacksize)
    1219           0 :         goto yyexhaustedlab;
    1220           0 :       yystacksize *= 2;
    1221           0 :       if (YYMAXDEPTH < yystacksize)
    1222           0 :         yystacksize = YYMAXDEPTH;
    1223             : 
    1224             :       {
    1225           0 :         yytype_int16 *yyss1 = yyss;
    1226             :         union yyalloc *yyptr =
    1227           0 :           (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
    1228           0 :         if (! yyptr)
    1229           0 :           goto yyexhaustedlab;
    1230           0 :         YYSTACK_RELOCATE (yyss_alloc, yyss);
    1231           0 :         YYSTACK_RELOCATE (yyvs_alloc, yyvs);
    1232             : # undef YYSTACK_RELOCATE
    1233           0 :         if (yyss1 != yyssa)
    1234           0 :           YYSTACK_FREE (yyss1);
    1235             :       }
    1236             : # endif
    1237             : 
    1238           0 :       yyssp = yyss + yysize - 1;
    1239           0 :       yyvsp = yyvs + yysize - 1;
    1240             : 
    1241             :       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
    1242             :                   (unsigned long) yystacksize));
    1243             : 
    1244           0 :       if (yyss + yystacksize - 1 <= yyssp)
    1245           0 :         YYABORT;
    1246             :     }
    1247             : #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
    1248             : 
    1249             :   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
    1250             : 
    1251       31240 :   if (yystate == YYFINAL)
    1252        2826 :     YYACCEPT;
    1253             : 
    1254       28414 :   goto yybackup;
    1255             : 
    1256             : 
    1257             : /*-----------.
    1258             : | yybackup.  |
    1259             : `-----------*/
    1260       28414 : yybackup:
    1261             :   /* Do appropriate processing given the current state.  Read a
    1262             :      lookahead token if we need one and don't already have one.  */
    1263             : 
    1264             :   /* First try to decide what to do without reference to lookahead token.  */
    1265       28414 :   yyn = yypact[yystate];
    1266       28414 :   if (yypact_value_is_default (yyn))
    1267       12346 :     goto yydefault;
    1268             : 
    1269             :   /* Not known => get a lookahead token if don't already have one.  */
    1270             : 
    1271             :   /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
    1272       16068 :   if (yychar == YYEMPTY)
    1273             :     {
    1274             :       YYDPRINTF ((stderr, "Reading a token: "));
    1275       11726 :       yychar = yylex ();
    1276             :     }
    1277             : 
    1278       16068 :   if (yychar <= YYEOF)
    1279             :     {
    1280        6584 :       yychar = yytoken = YYEOF;
    1281             :       YYDPRINTF ((stderr, "Now at end of input.\n"));
    1282             :     }
    1283             :   else
    1284             :     {
    1285        9484 :       yytoken = YYTRANSLATE (yychar);
    1286             :       YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
    1287             :     }
    1288             : 
    1289             :   /* If the proper action on seeing token YYTOKEN is to reduce or to
    1290             :      detect an error, take that action.  */
    1291       16068 :   yyn += yytoken;
    1292       16068 :   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
    1293        4342 :     goto yydefault;
    1294       11726 :   yyn = yytable[yyn];
    1295       11726 :   if (yyn <= 0)
    1296             :     {
    1297             :       if (yytable_value_is_error (yyn))
    1298             :         goto yyerrlab;
    1299           0 :       yyn = -yyn;
    1300           0 :       goto yyreduce;
    1301             :     }
    1302             : 
    1303             :   /* Count tokens shifted since error; after three, turn off error
    1304             :      status.  */
    1305       11726 :   if (yyerrstatus)
    1306           0 :     yyerrstatus--;
    1307             : 
    1308             :   /* Shift the lookahead token.  */
    1309             :   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
    1310             : 
    1311             :   /* Discard the shifted token.  */
    1312       11726 :   yychar = YYEMPTY;
    1313             : 
    1314       11726 :   yystate = yyn;
    1315             :   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
    1316       11726 :   *++yyvsp = yylval;
    1317             :   YY_IGNORE_MAYBE_UNINITIALIZED_END
    1318             : 
    1319       11726 :   goto yynewstate;
    1320             : 
    1321             : 
    1322             : /*-----------------------------------------------------------.
    1323             : | yydefault -- do the default action for the current state.  |
    1324             : `-----------------------------------------------------------*/
    1325       16688 : yydefault:
    1326       16688 :   yyn = yydefact[yystate];
    1327       16688 :   if (yyn == 0)
    1328           0 :     goto yyerrlab;
    1329       16688 :   goto yyreduce;
    1330             : 
    1331             : 
    1332             : /*-----------------------------.
    1333             : | yyreduce -- do a reduction.  |
    1334             : `-----------------------------*/
    1335       16688 : yyreduce:
    1336             :   /* yyn is the number of a rule to reduce with.  */
    1337       16688 :   yylen = yyr2[yyn];
    1338             : 
    1339             :   /* If YYLEN is nonzero, implement the default value of the action:
    1340             :      '$$ = $1'.
    1341             : 
    1342             :      Otherwise, the following line sets YYVAL to garbage.
    1343             :      This behavior is undocumented and Bison
    1344             :      users should not rely upon it.  Assigning to YYVAL
    1345             :      unconditionally makes the parser a bit smaller, and it avoids a
    1346             :      GCC warning that YYVAL may be used uninitialized.  */
    1347       16688 :   yyval = yyvsp[1-yylen];
    1348             : 
    1349             : 
    1350             :   YY_REDUCE_PRINT (yyn);
    1351       16688 :   switch (yyn)
    1352             :     {
    1353        2826 :         case 2:
    1354             : #line 111 "repl_gram.y" /* yacc.c:1652  */
    1355             :     {
    1356             :                     replication_parse_result = (yyvsp[-1].node);
    1357             :                 }
    1358             : #line 1359 "repl_gram.c" /* yacc.c:1652  */
    1359        2826 :     break;
    1360             : 
    1361         482 :   case 14:
    1362             : #line 137 "repl_gram.y" /* yacc.c:1652  */
    1363             :     {
    1364             :                     (yyval.node) = (Node *) makeNode(IdentifySystemCmd);
    1365             :                 }
    1366             : #line 1367 "repl_gram.c" /* yacc.c:1652  */
    1367         482 :     break;
    1368             : 
    1369         482 :   case 15:
    1370             : #line 147 "repl_gram.y" /* yacc.c:1652  */
    1371             :     {
    1372             :                     VariableShowStmt *n = makeNode(VariableShowStmt);
    1373             :                     n->name = (yyvsp[0].str);
    1374             :                     (yyval.node) = (Node *) n;
    1375             :                 }
    1376             : #line 1377 "repl_gram.c" /* yacc.c:1652  */
    1377         482 :     break;
    1378             : 
    1379         482 :   case 16:
    1380             : #line 153 "repl_gram.y" /* yacc.c:1652  */
    1381             :     { (yyval.str) = (yyvsp[0].str); }
    1382             : #line 1383 "repl_gram.c" /* yacc.c:1652  */
    1383         482 :     break;
    1384             : 
    1385           0 :   case 17:
    1386             : #line 155 "repl_gram.y" /* yacc.c:1652  */
    1387             :     { (yyval.str) = psprintf("%s.%s", (yyvsp[-2].str), (yyvsp[0].str)); }
    1388             : #line 1389 "repl_gram.c" /* yacc.c:1652  */
    1389           0 :     break;
    1390             : 
    1391         152 :   case 18:
    1392             : #line 165 "repl_gram.y" /* yacc.c:1652  */
    1393             :     {
    1394             :                     BaseBackupCmd *cmd = makeNode(BaseBackupCmd);
    1395             :                     cmd->options = (yyvsp[0].list);
    1396             :                     (yyval.node) = (Node *) cmd;
    1397             :                 }
    1398             : #line 1399 "repl_gram.c" /* yacc.c:1652  */
    1399         152 :     break;
    1400             : 
    1401         694 :   case 19:
    1402             : #line 174 "repl_gram.y" /* yacc.c:1652  */
    1403             :     { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].defelt)); }
    1404             : #line 1405 "repl_gram.c" /* yacc.c:1652  */
    1405         694 :     break;
    1406             : 
    1407         152 :   case 20:
    1408             : #line 176 "repl_gram.y" /* yacc.c:1652  */
    1409             :     { (yyval.list) = NIL; }
    1410             : #line 1411 "repl_gram.c" /* yacc.c:1652  */
    1411         152 :     break;
    1412             : 
    1413         152 :   case 21:
    1414             : #line 181 "repl_gram.y" /* yacc.c:1652  */
    1415             :     {
    1416             :                   (yyval.defelt) = makeDefElem("label",
    1417             :                                    (Node *)makeString((yyvsp[0].str)), -1);
    1418             :                 }
    1419             : #line 1420 "repl_gram.c" /* yacc.c:1652  */
    1420         152 :     break;
    1421             : 
    1422         152 :   case 22:
    1423             : #line 186 "repl_gram.y" /* yacc.c:1652  */
    1424             :     {
    1425             :                   (yyval.defelt) = makeDefElem("progress",
    1426             :                                    (Node *)makeInteger(true), -1);
    1427             :                 }
    1428             : #line 1429 "repl_gram.c" /* yacc.c:1652  */
    1429         152 :     break;
    1430             : 
    1431          62 :   case 23:
    1432             : #line 191 "repl_gram.y" /* yacc.c:1652  */
    1433             :     {
    1434             :                   (yyval.defelt) = makeDefElem("fast",
    1435             :                                    (Node *)makeInteger(true), -1);
    1436             :                 }
    1437             : #line 1438 "repl_gram.c" /* yacc.c:1652  */
    1438          62 :     break;
    1439             : 
    1440           2 :   case 24:
    1441             : #line 196 "repl_gram.y" /* yacc.c:1652  */
    1442             :     {
    1443             :                   (yyval.defelt) = makeDefElem("wal",
    1444             :                                    (Node *)makeInteger(true), -1);
    1445             :                 }
    1446             : #line 1447 "repl_gram.c" /* yacc.c:1652  */
    1447           2 :     break;
    1448             : 
    1449         150 :   case 25:
    1450             : #line 201 "repl_gram.y" /* yacc.c:1652  */
    1451             :     {
    1452             :                   (yyval.defelt) = makeDefElem("nowait",
    1453             :                                    (Node *)makeInteger(true), -1);
    1454             :                 }
    1455             : #line 1456 "repl_gram.c" /* yacc.c:1652  */
    1456         150 :     break;
    1457             : 
    1458           0 :   case 26:
    1459             : #line 206 "repl_gram.y" /* yacc.c:1652  */
    1460             :     {
    1461             :                   (yyval.defelt) = makeDefElem("max_rate",
    1462             :                                    (Node *)makeInteger((yyvsp[0].uintval)), -1);
    1463             :                 }
    1464             : #line 1465 "repl_gram.c" /* yacc.c:1652  */
    1465           0 :     break;
    1466             : 
    1467          10 :   case 27:
    1468             : #line 211 "repl_gram.y" /* yacc.c:1652  */
    1469             :     {
    1470             :                   (yyval.defelt) = makeDefElem("tablespace_map",
    1471             :                                    (Node *)makeInteger(true), -1);
    1472             :                 }
    1473             : #line 1474 "repl_gram.c" /* yacc.c:1652  */
    1474          10 :     break;
    1475             : 
    1476           2 :   case 28:
    1477             : #line 216 "repl_gram.y" /* yacc.c:1652  */
    1478             :     {
    1479             :                   (yyval.defelt) = makeDefElem("noverify_checksums",
    1480             :                                    (Node *)makeInteger(true), -1);
    1481             :                 }
    1482             : #line 1483 "repl_gram.c" /* yacc.c:1652  */
    1483           2 :     break;
    1484             : 
    1485         150 :   case 29:
    1486             : #line 221 "repl_gram.y" /* yacc.c:1652  */
    1487             :     {
    1488             :                   (yyval.defelt) = makeDefElem("manifest",
    1489             :                                    (Node *)makeString((yyvsp[0].str)), -1);
    1490             :                 }
    1491             : #line 1492 "repl_gram.c" /* yacc.c:1652  */
    1492         150 :     break;
    1493             : 
    1494          14 :   case 30:
    1495             : #line 226 "repl_gram.y" /* yacc.c:1652  */
    1496             :     {
    1497             :                   (yyval.defelt) = makeDefElem("manifest_checksums",
    1498             :                                    (Node *)makeString((yyvsp[0].str)), -1);
    1499             :                 }
    1500             : #line 1501 "repl_gram.c" /* yacc.c:1652  */
    1501          14 :     break;
    1502             : 
    1503         138 :   case 31:
    1504             : #line 235 "repl_gram.y" /* yacc.c:1652  */
    1505             :     {
    1506             :                     CreateReplicationSlotCmd *cmd;
    1507             :                     cmd = makeNode(CreateReplicationSlotCmd);
    1508             :                     cmd->kind = REPLICATION_KIND_PHYSICAL;
    1509             :                     cmd->slotname = (yyvsp[-3].str);
    1510             :                     cmd->temporary = (yyvsp[-2].boolval);
    1511             :                     cmd->options = (yyvsp[0].list);
    1512             :                     (yyval.node) = (Node *) cmd;
    1513             :                 }
    1514             : #line 1515 "repl_gram.c" /* yacc.c:1652  */
    1515         138 :     break;
    1516             : 
    1517         174 :   case 32:
    1518             : #line 246 "repl_gram.y" /* yacc.c:1652  */
    1519             :     {
    1520             :                     CreateReplicationSlotCmd *cmd;
    1521             :                     cmd = makeNode(CreateReplicationSlotCmd);
    1522             :                     cmd->kind = REPLICATION_KIND_LOGICAL;
    1523             :                     cmd->slotname = (yyvsp[-4].str);
    1524             :                     cmd->temporary = (yyvsp[-3].boolval);
    1525             :                     cmd->plugin = (yyvsp[-1].str);
    1526             :                     cmd->options = (yyvsp[0].list);
    1527             :                     (yyval.node) = (Node *) cmd;
    1528             :                 }
    1529             : #line 1530 "repl_gram.c" /* yacc.c:1652  */
    1530         174 :     break;
    1531             : 
    1532         310 :   case 33:
    1533             : #line 260 "repl_gram.y" /* yacc.c:1652  */
    1534             :     { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].defelt)); }
    1535             : #line 1536 "repl_gram.c" /* yacc.c:1652  */
    1536         310 :     break;
    1537             : 
    1538         312 :   case 34:
    1539             : #line 262 "repl_gram.y" /* yacc.c:1652  */
    1540             :     { (yyval.list) = NIL; }
    1541             : #line 1542 "repl_gram.c" /* yacc.c:1652  */
    1542         312 :     break;
    1543             : 
    1544           0 :   case 35:
    1545             : #line 267 "repl_gram.y" /* yacc.c:1652  */
    1546             :     {
    1547             :                   (yyval.defelt) = makeDefElem("export_snapshot",
    1548             :                                    (Node *)makeInteger(true), -1);
    1549             :                 }
    1550             : #line 1551 "repl_gram.c" /* yacc.c:1652  */
    1551           0 :     break;
    1552             : 
    1553          54 :   case 36:
    1554             : #line 272 "repl_gram.y" /* yacc.c:1652  */
    1555             :     {
    1556             :                   (yyval.defelt) = makeDefElem("export_snapshot",
    1557             :                                    (Node *)makeInteger(false), -1);
    1558             :                 }
    1559             : #line 1560 "repl_gram.c" /* yacc.c:1652  */
    1560          54 :     break;
    1561             : 
    1562         120 :   case 37:
    1563             : #line 277 "repl_gram.y" /* yacc.c:1652  */
    1564             :     {
    1565             :                   (yyval.defelt) = makeDefElem("use_snapshot",
    1566             :                                    (Node *)makeInteger(true), -1);
    1567             :                 }
    1568             : #line 1569 "repl_gram.c" /* yacc.c:1652  */
    1569         120 :     break;
    1570             : 
    1571         136 :   case 38:
    1572             : #line 282 "repl_gram.y" /* yacc.c:1652  */
    1573             :     {
    1574             :                   (yyval.defelt) = makeDefElem("reserve_wal",
    1575             :                                    (Node *)makeInteger(true), -1);
    1576             :                 }
    1577             : #line 1578 "repl_gram.c" /* yacc.c:1652  */
    1578         136 :     break;
    1579             : 
    1580           2 :   case 39:
    1581             : #line 291 "repl_gram.y" /* yacc.c:1652  */
    1582             :     {
    1583             :                     DropReplicationSlotCmd *cmd;
    1584             :                     cmd = makeNode(DropReplicationSlotCmd);
    1585             :                     cmd->slotname = (yyvsp[0].str);
    1586             :                     cmd->wait = false;
    1587             :                     (yyval.node) = (Node *) cmd;
    1588             :                 }
    1589             : #line 1590 "repl_gram.c" /* yacc.c:1652  */
    1590           2 :     break;
    1591             : 
    1592          14 :   case 40:
    1593             : #line 299 "repl_gram.y" /* yacc.c:1652  */
    1594             :     {
    1595             :                     DropReplicationSlotCmd *cmd;
    1596             :                     cmd = makeNode(DropReplicationSlotCmd);
    1597             :                     cmd->slotname = (yyvsp[-1].str);
    1598             :                     cmd->wait = true;
    1599             :                     (yyval.node) = (Node *) cmd;
    1600             :                 }
    1601             : #line 1602 "repl_gram.c" /* yacc.c:1652  */
    1602          14 :     break;
    1603             : 
    1604         256 :   case 41:
    1605             : #line 313 "repl_gram.y" /* yacc.c:1652  */
    1606             :     {
    1607             :                     StartReplicationCmd *cmd;
    1608             : 
    1609             :                     cmd = makeNode(StartReplicationCmd);
    1610             :                     cmd->kind = REPLICATION_KIND_PHYSICAL;
    1611             :                     cmd->slotname = (yyvsp[-3].str);
    1612             :                     cmd->startpoint = (yyvsp[-1].recptr);
    1613             :                     cmd->timeline = (yyvsp[0].uintval);
    1614             :                     (yyval.node) = (Node *) cmd;
    1615             :                 }
    1616             : #line 1617 "repl_gram.c" /* yacc.c:1652  */
    1617         256 :     break;
    1618             : 
    1619         186 :   case 42:
    1620             : #line 328 "repl_gram.y" /* yacc.c:1652  */
    1621             :     {
    1622             :                     StartReplicationCmd *cmd;
    1623             :                     cmd = makeNode(StartReplicationCmd);
    1624             :                     cmd->kind = REPLICATION_KIND_LOGICAL;
    1625             :                     cmd->slotname = (yyvsp[-3].str);
    1626             :                     cmd->startpoint = (yyvsp[-1].recptr);
    1627             :                     cmd->options = (yyvsp[0].list);
    1628             :                     (yyval.node) = (Node *) cmd;
    1629             :                 }
    1630             : #line 1631 "repl_gram.c" /* yacc.c:1652  */
    1631         186 :     break;
    1632             : 
    1633          10 :   case 43:
    1634             : #line 343 "repl_gram.y" /* yacc.c:1652  */
    1635             :     {
    1636             :                     TimeLineHistoryCmd *cmd;
    1637             : 
    1638             :                     if ((yyvsp[0].uintval) <= 0)
    1639             :                         ereport(ERROR,
    1640             :                                 (errcode(ERRCODE_SYNTAX_ERROR),
    1641             :                                  errmsg("invalid timeline %u", (yyvsp[0].uintval))));
    1642             : 
    1643             :                     cmd = makeNode(TimeLineHistoryCmd);
    1644             :                     cmd->timeline = (yyvsp[0].uintval);
    1645             : 
    1646             :                     (yyval.node) = (Node *) cmd;
    1647             :                 }
    1648             : #line 1649 "repl_gram.c" /* yacc.c:1652  */
    1649          10 :     break;
    1650             : 
    1651         252 :   case 46:
    1652             : #line 364 "repl_gram.y" /* yacc.c:1652  */
    1653             :     { (yyval.boolval) = true; }
    1654             : #line 1655 "repl_gram.c" /* yacc.c:1652  */
    1655         252 :     break;
    1656             : 
    1657          60 :   case 47:
    1658             : #line 365 "repl_gram.y" /* yacc.c:1652  */
    1659             :     { (yyval.boolval) = false; }
    1660             : #line 1661 "repl_gram.c" /* yacc.c:1652  */
    1661          60 :     break;
    1662             : 
    1663         158 :   case 48:
    1664             : #line 370 "repl_gram.y" /* yacc.c:1652  */
    1665             :     { (yyval.str) = (yyvsp[0].str); }
    1666             : #line 1667 "repl_gram.c" /* yacc.c:1652  */
    1667         158 :     break;
    1668             : 
    1669          98 :   case 49:
    1670             : #line 372 "repl_gram.y" /* yacc.c:1652  */
    1671             :     { (yyval.str) = NULL; }
    1672             : #line 1673 "repl_gram.c" /* yacc.c:1652  */
    1673          98 :     break;
    1674             : 
    1675         256 :   case 50:
    1676             : #line 377 "repl_gram.y" /* yacc.c:1652  */
    1677             :     {
    1678             :                     if ((yyvsp[0].uintval) <= 0)
    1679             :                         ereport(ERROR,
    1680             :                                 (errcode(ERRCODE_SYNTAX_ERROR),
    1681             :                                  errmsg("invalid timeline %u", (yyvsp[0].uintval))));
    1682             :                     (yyval.uintval) = (yyvsp[0].uintval);
    1683             :                 }
    1684             : #line 1685 "repl_gram.c" /* yacc.c:1652  */
    1685         256 :     break;
    1686             : 
    1687           0 :   case 51:
    1688             : #line 384 "repl_gram.y" /* yacc.c:1652  */
    1689             :     { (yyval.uintval) = 0; }
    1690             : #line 1691 "repl_gram.c" /* yacc.c:1652  */
    1691           0 :     break;
    1692             : 
    1693         178 :   case 52:
    1694             : #line 389 "repl_gram.y" /* yacc.c:1652  */
    1695             :     { (yyval.list) = (yyvsp[-1].list); }
    1696             : #line 1697 "repl_gram.c" /* yacc.c:1652  */
    1697         178 :     break;
    1698             : 
    1699           8 :   case 53:
    1700             : #line 390 "repl_gram.y" /* yacc.c:1652  */
    1701             :     { (yyval.list) = NIL; }
    1702             : #line 1703 "repl_gram.c" /* yacc.c:1652  */
    1703           8 :     break;
    1704             : 
    1705         178 :   case 54:
    1706             : #line 395 "repl_gram.y" /* yacc.c:1652  */
    1707             :     {
    1708             :                     (yyval.list) = list_make1((yyvsp[0].defelt));
    1709             :                 }
    1710             : #line 1711 "repl_gram.c" /* yacc.c:1652  */
    1711         178 :     break;
    1712             : 
    1713         210 :   case 55:
    1714             : #line 399 "repl_gram.y" /* yacc.c:1652  */
    1715             :     {
    1716             :                     (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].defelt));
    1717             :                 }
    1718             : #line 1719 "repl_gram.c" /* yacc.c:1652  */
    1719         210 :     break;
    1720             : 
    1721         388 :   case 56:
    1722             : #line 406 "repl_gram.y" /* yacc.c:1652  */
    1723             :     {
    1724             :                     (yyval.defelt) = makeDefElem((yyvsp[-1].str), (yyvsp[0].node), -1);
    1725             :                 }
    1726             : #line 1727 "repl_gram.c" /* yacc.c:1652  */
    1727         388 :     break;
    1728             : 
    1729         388 :   case 57:
    1730             : #line 412 "repl_gram.y" /* yacc.c:1652  */
    1731             :     { (yyval.node) = (Node *) makeString((yyvsp[0].str)); }
    1732             : #line 1733 "repl_gram.c" /* yacc.c:1652  */
    1733         388 :     break;
    1734             : 
    1735           0 :   case 58:
    1736             : #line 413 "repl_gram.y" /* yacc.c:1652  */
    1737             :     { (yyval.node) = NULL; }
    1738             : #line 1739 "repl_gram.c" /* yacc.c:1652  */
    1739           0 :     break;
    1740             : 
    1741         930 :   case 59:
    1742             : #line 417 "repl_gram.y" /* yacc.c:1652  */
    1743             :     { (yyval.node) = (Node *) make_sqlcmd(); }
    1744             : #line 1745 "repl_gram.c" /* yacc.c:1652  */
    1745         930 :     break;
    1746             : 
    1747             : 
    1748             : #line 1749 "repl_gram.c" /* yacc.c:1652  */
    1749        5908 :       default: break;
    1750             :     }
    1751             :   /* User semantic actions sometimes alter yychar, and that requires
    1752             :      that yytoken be updated with the new translation.  We take the
    1753             :      approach of translating immediately before every use of yytoken.
    1754             :      One alternative is translating here after every semantic action,
    1755             :      but that translation would be missed if the semantic action invokes
    1756             :      YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
    1757             :      if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
    1758             :      incorrect destructor might then be invoked immediately.  In the
    1759             :      case of YYERROR or YYBACKUP, subsequent parser actions might lead
    1760             :      to an incorrect destructor call or verbose syntax error message
    1761             :      before the lookahead is translated.  */
    1762             :   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
    1763             : 
    1764       16688 :   YYPOPSTACK (yylen);
    1765       16688 :   yylen = 0;
    1766             :   YY_STACK_PRINT (yyss, yyssp);
    1767             : 
    1768       16688 :   *++yyvsp = yyval;
    1769             : 
    1770             :   /* Now 'shift' the result of the reduction.  Determine what state
    1771             :      that goes to, based on the state we popped back to and the rule
    1772             :      number reduced by.  */
    1773             :   {
    1774       16688 :     const int yylhs = yyr1[yyn] - YYNTOKENS;
    1775       16688 :     const int yyi = yypgoto[yylhs] + *yyssp;
    1776        2538 :     yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
    1777         558 :                ? yytable[yyi]
    1778       19226 :                : yydefgoto[yylhs]);
    1779             :   }
    1780             : 
    1781       16688 :   goto yynewstate;
    1782             : 
    1783             : 
    1784             : /*--------------------------------------.
    1785             : | yyerrlab -- here on detecting error.  |
    1786             : `--------------------------------------*/
    1787           0 : yyerrlab:
    1788             :   /* Make sure we have latest lookahead translation.  See comments at
    1789             :      user semantic actions for why this is necessary.  */
    1790           0 :   yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
    1791             : 
    1792             :   /* If not already recovering from an error, report this error.  */
    1793           0 :   if (!yyerrstatus)
    1794             :     {
    1795           0 :       ++yynerrs;
    1796             : #if ! YYERROR_VERBOSE
    1797           0 :       yyerror (YY_("syntax error"));
    1798             : #else
    1799             : # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
    1800             :                                         yyssp, yytoken)
    1801             :       {
    1802             :         char const *yymsgp = YY_("syntax error");
    1803             :         int yysyntax_error_status;
    1804             :         yysyntax_error_status = YYSYNTAX_ERROR;
    1805             :         if (yysyntax_error_status == 0)
    1806             :           yymsgp = yymsg;
    1807             :         else if (yysyntax_error_status == 1)
    1808             :           {
    1809             :             if (yymsg != yymsgbuf)
    1810             :               YYSTACK_FREE (yymsg);
    1811             :             yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
    1812             :             if (!yymsg)
    1813             :               {
    1814             :                 yymsg = yymsgbuf;
    1815             :                 yymsg_alloc = sizeof yymsgbuf;
    1816             :                 yysyntax_error_status = 2;
    1817             :               }
    1818             :             else
    1819             :               {
    1820             :                 yysyntax_error_status = YYSYNTAX_ERROR;
    1821             :                 yymsgp = yymsg;
    1822             :               }
    1823             :           }
    1824             :         yyerror (yymsgp);
    1825             :         if (yysyntax_error_status == 2)
    1826             :           goto yyexhaustedlab;
    1827             :       }
    1828             : # undef YYSYNTAX_ERROR
    1829             : #endif
    1830             :     }
    1831             : 
    1832             : 
    1833             : 
    1834           0 :   if (yyerrstatus == 3)
    1835             :     {
    1836             :       /* If just tried and failed to reuse lookahead token after an
    1837             :          error, discard it.  */
    1838             : 
    1839           0 :       if (yychar <= YYEOF)
    1840             :         {
    1841             :           /* Return failure if at end of input.  */
    1842           0 :           if (yychar == YYEOF)
    1843           0 :             YYABORT;
    1844             :         }
    1845             :       else
    1846             :         {
    1847           0 :           yydestruct ("Error: discarding",
    1848             :                       yytoken, &yylval);
    1849           0 :           yychar = YYEMPTY;
    1850             :         }
    1851             :     }
    1852             : 
    1853             :   /* Else will try to reuse lookahead token after shifting the error
    1854             :      token.  */
    1855           0 :   goto yyerrlab1;
    1856             : 
    1857             : 
    1858             : /*---------------------------------------------------.
    1859             : | yyerrorlab -- error raised explicitly by YYERROR.  |
    1860             : `---------------------------------------------------*/
    1861             : yyerrorlab:
    1862             :   /* Pacify compilers when the user code never invokes YYERROR and the
    1863             :      label yyerrorlab therefore never appears in user code.  */
    1864             :   if (0)
    1865             :     YYERROR;
    1866             : 
    1867             :   /* Do not reclaim the symbols of the rule whose action triggered
    1868             :      this YYERROR.  */
    1869             :   YYPOPSTACK (yylen);
    1870             :   yylen = 0;
    1871             :   YY_STACK_PRINT (yyss, yyssp);
    1872             :   yystate = *yyssp;
    1873             :   goto yyerrlab1;
    1874             : 
    1875             : 
    1876             : /*-------------------------------------------------------------.
    1877             : | yyerrlab1 -- common code for both syntax error and YYERROR.  |
    1878             : `-------------------------------------------------------------*/
    1879           0 : yyerrlab1:
    1880           0 :   yyerrstatus = 3;      /* Each real token shifted decrements this.  */
    1881             : 
    1882             :   for (;;)
    1883             :     {
    1884           0 :       yyn = yypact[yystate];
    1885           0 :       if (!yypact_value_is_default (yyn))
    1886             :         {
    1887           0 :           yyn += YYTERROR;
    1888           0 :           if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
    1889             :             {
    1890           0 :               yyn = yytable[yyn];
    1891           0 :               if (0 < yyn)
    1892           0 :                 break;
    1893             :             }
    1894             :         }
    1895             : 
    1896             :       /* Pop the current state because it cannot handle the error token.  */
    1897           0 :       if (yyssp == yyss)
    1898           0 :         YYABORT;
    1899             : 
    1900             : 
    1901           0 :       yydestruct ("Error: popping",
    1902           0 :                   yystos[yystate], yyvsp);
    1903           0 :       YYPOPSTACK (1);
    1904           0 :       yystate = *yyssp;
    1905             :       YY_STACK_PRINT (yyss, yyssp);
    1906             :     }
    1907             : 
    1908             :   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
    1909           0 :   *++yyvsp = yylval;
    1910             :   YY_IGNORE_MAYBE_UNINITIALIZED_END
    1911             : 
    1912             : 
    1913             :   /* Shift the error token.  */
    1914             :   YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
    1915             : 
    1916           0 :   yystate = yyn;
    1917           0 :   goto yynewstate;
    1918             : 
    1919             : 
    1920             : /*-------------------------------------.
    1921             : | yyacceptlab -- YYACCEPT comes here.  |
    1922             : `-------------------------------------*/
    1923        2826 : yyacceptlab:
    1924        2826 :   yyresult = 0;
    1925        2826 :   goto yyreturn;
    1926             : 
    1927             : 
    1928             : /*-----------------------------------.
    1929             : | yyabortlab -- YYABORT comes here.  |
    1930             : `-----------------------------------*/
    1931           0 : yyabortlab:
    1932           0 :   yyresult = 1;
    1933           0 :   goto yyreturn;
    1934             : 
    1935             : 
    1936             : #if !defined yyoverflow || YYERROR_VERBOSE
    1937             : /*-------------------------------------------------.
    1938             : | yyexhaustedlab -- memory exhaustion comes here.  |
    1939             : `-------------------------------------------------*/
    1940           0 : yyexhaustedlab:
    1941           0 :   yyerror (YY_("memory exhausted"));
    1942             :   yyresult = 2;
    1943             :   /* Fall through.  */
    1944             : #endif
    1945             : 
    1946             : 
    1947             : /*-----------------------------------------------------.
    1948             : | yyreturn -- parsing is finished, return the result.  |
    1949             : `-----------------------------------------------------*/
    1950        2826 : yyreturn:
    1951        2826 :   if (yychar != YYEMPTY)
    1952             :     {
    1953             :       /* Make sure we have latest lookahead translation.  See comments at
    1954             :          user semantic actions for why this is necessary.  */
    1955           0 :       yytoken = YYTRANSLATE (yychar);
    1956           0 :       yydestruct ("Cleanup: discarding lookahead",
    1957             :                   yytoken, &yylval);
    1958             :     }
    1959             :   /* Do not reclaim the symbols of the rule whose action triggered
    1960             :      this YYABORT or YYACCEPT.  */
    1961        2826 :   YYPOPSTACK (yylen);
    1962             :   YY_STACK_PRINT (yyss, yyssp);
    1963        8478 :   while (yyssp != yyss)
    1964             :     {
    1965        5652 :       yydestruct ("Cleanup: popping",
    1966        5652 :                   yystos[*yyssp], yyvsp);
    1967        5652 :       YYPOPSTACK (1);
    1968             :     }
    1969             : #ifndef yyoverflow
    1970        2826 :   if (yyss != yyssa)
    1971           0 :     YYSTACK_FREE (yyss);
    1972             : #endif
    1973             : #if YYERROR_VERBOSE
    1974             :   if (yymsg != yymsgbuf)
    1975             :     YYSTACK_FREE (yymsg);
    1976             : #endif
    1977        2826 :   return yyresult;
    1978             : }
    1979             : #line 419 "repl_gram.y" /* yacc.c:1918  */
    1980             : 
    1981             : 
    1982             : static SQLCmd *
    1983             : make_sqlcmd(void)
    1984             : {
    1985             :     SQLCmd *cmd = makeNode(SQLCmd);
    1986             :     int tok;
    1987             : 
    1988             :     /* Just move lexer to the end of command. */
    1989             :     for (;;)
    1990             :     {
    1991             :         tok = yylex();
    1992             :         if (tok == ';' || tok == 0)
    1993             :             break;
    1994             :     }
    1995             :     return cmd;
    1996             : }
    1997             : 
    1998             : #include "repl_scanner.c"

Generated by: LCOV version 1.13