%union {
char *str;
bool boolval;
- int32 intval;
+ uint32 uintval;
XLogRecPtr recptr;
Node *node;
/* Non-keyword tokens */
%token <str> SCONST
-%token <intval> ICONST
+%token <uintval> UCONST
%token <recptr> RECPTR
/* Keyword tokens. */
%type <node> base_backup start_replication identify_system timeline_history
%type <list> base_backup_opt_list
%type <defelt> base_backup_opt
-%type <intval> opt_timeline
+%type <uintval> opt_timeline
%%
firstcmd: command opt_semicolon
;
opt_timeline:
- K_TIMELINE ICONST
+ K_TIMELINE UCONST
{
if ($2 <= 0)
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
- (errmsg("invalid timeline %d", $2))));
+ (errmsg("invalid timeline %u", $2))));
$$ = $2;
}
| /* nothing */ { $$ = 0; }
* TIMELINE_HISTORY %d
*/
timeline_history:
- K_TIMELINE_HISTORY ICONST
+ K_TIMELINE_HISTORY UCONST
{
TimeLineHistoryCmd *cmd;
if ($2 <= 0)
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
- (errmsg("invalid timeline %d", $2))));
+ (errmsg("invalid timeline %u", $2))));
cmd = makeNode(TimeLineHistoryCmd);
cmd->timeline = $2;
" " ;
{digit}+ {
- yylval.intval = pg_atoi(yytext, sizeof(int32), 0);
- return ICONST;
+ yylval.uintval = strtoul(yytext, NULL, 10);
+ return UCONST;
}
{hexdigit}+\/{hexdigit}+ {