⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bootparse.c

📁 PostgreSQL 8.1.4的源码 适用于Linux下的开源数据库系统
💻 C
📖 第 1 页 / 共 4 页
字号:
						Oid id;						id = heap_create_with_catalog(LexIDStr(Int_yyvsp[-6].ival),													  PG_CATALOG_NAMESPACE,													  Int_yyvsp[-8].ival ? GLOBALTABLESPACE_OID : 0,													  Int_yyvsp[-5].oidval,													  BOOTSTRAP_SUPERUSERID,													  tupdesc,													  RELKIND_RELATION,													  Int_yyvsp[-8].ival,													  true,													  0,													  ONCOMMIT_NOOP,													  true);						elog(DEBUG4, "relation created with oid %u", id);					}					do_end();				}    break;  case 19:#line 219 "bootparse.y"    {					do_start();					if (Int_yyvsp[0].oidval)						elog(DEBUG4, "inserting row with oid %u", Int_yyvsp[0].oidval);					else						elog(DEBUG4, "inserting row");					num_columns_read = 0;				}    break;  case 20:#line 228 "bootparse.y"    {					if (num_columns_read != numattr)						elog(ERROR, "incorrect number of columns in row (expected %d, got %d)",							 numattr, num_columns_read);					if (boot_reldesc == NULL)					{						elog(ERROR, "relation not open");						err_out();					}					InsertOneTuple(Int_yyvsp[-4].oidval);					do_end();				}    break;  case 21:#line 244 "bootparse.y"    {					do_start();					DefineIndex(makeRangeVar(NULL, LexIDStr(Int_yyvsp[-5].ival)),								LexIDStr(Int_yyvsp[-8].ival),								Int_yyvsp[-7].oidval,								LexIDStr(Int_yyvsp[-3].ival),								NULL,								Int_yyvsp[-1].list,								NULL, NIL,								false, false, false,								false, false, true, false);					do_end();				}    break;  case 22:#line 262 "bootparse.y"    {					do_start();					DefineIndex(makeRangeVar(NULL, LexIDStr(Int_yyvsp[-5].ival)),								LexIDStr(Int_yyvsp[-8].ival),								Int_yyvsp[-7].oidval,								LexIDStr(Int_yyvsp[-3].ival),								NULL,								Int_yyvsp[-1].list,								NULL, NIL,								true, false, false,								false, false, true, false);					do_end();				}    break;  case 23:#line 280 "bootparse.y"    {					do_start();					build_indices();					do_end();				}    break;  case 24:#line 289 "bootparse.y"    { Int_yyval.list = lappend(Int_yyvsp[-2].list, Int_yyvsp[0].ielem); }    break;  case 25:#line 290 "bootparse.y"    { Int_yyval.list = list_make1(Int_yyvsp[0].ielem); }    break;  case 26:#line 295 "bootparse.y"    {					IndexElem *n = makeNode(IndexElem);					n->name = LexIDStr(Int_yyvsp[-1].ival);					n->expr = NULL;					n->opclass = list_make1(makeString(LexIDStr(Int_yyvsp[0].ival)));					Int_yyval.ielem = n;				}    break;  case 27:#line 305 "bootparse.y"    { Int_yyval.ival = 1; }    break;  case 28:#line 306 "bootparse.y"    { Int_yyval.ival = 0; }    break;  case 29:#line 310 "bootparse.y"    { Int_yyval.ival = 1; }    break;  case 30:#line 311 "bootparse.y"    { Int_yyval.ival = 0; }    break;  case 31:#line 315 "bootparse.y"    { Int_yyval.ival = 1; }    break;  case 32:#line 316 "bootparse.y"    { Int_yyval.ival = 0; }    break;  case 35:#line 326 "bootparse.y"    {				   if (++numattr > MAXATTR)						elog(FATAL, "too many columns");				   DefineAttr(LexIDStr(Int_yyvsp[-2].ival),LexIDStr(Int_yyvsp[0].ival),numattr-1);				}    break;  case 36:#line 334 "bootparse.y"    { Int_yyval.oidval = atooid(LexIDStr(Int_yyvsp[0].ival)); }    break;  case 37:#line 338 "bootparse.y"    { Int_yyval.oidval = Int_yyvsp[0].oidval; }    break;  case 38:#line 339 "bootparse.y"    { Int_yyval.oidval = (Oid) 0; }    break;  case 42:#line 350 "bootparse.y"    { InsertOneValue(LexIDStr(Int_yyvsp[0].ival), num_columns_read++); }    break;  case 43:#line 352 "bootparse.y"    { InsertOneValue(LexIDStr(Int_yyvsp[0].ival), num_columns_read++); }    break;  case 44:#line 354 "bootparse.y"    { InsertOneNull(num_columns_read++); }    break;  case 45:#line 358 "bootparse.y"    { Int_yyval.ival=Int_yylval.ival; }    break;  case 46:#line 362 "bootparse.y"    { Int_yyval.ival=Int_yylval.ival; }    break;    }/* Line 991 of yacc.c.  */#line 1443 "y.tab.c"  Int_yyvsp -= Int_yylen;  Int_yyssp -= Int_yylen;  YY_STACK_PRINT (Int_yyss, Int_yyssp);  *++Int_yyvsp = Int_yyval;  /* Now `shift' the result of the reduction.  Determine what state     that goes to, based on the state we popped back to and the rule     number reduced by.  */  Int_yyn = Int_yyr1[Int_yyn];  Int_yystate = Int_yypgoto[Int_yyn - YYNTOKENS] + *Int_yyssp;  if (0 <= Int_yystate && Int_yystate <= YYLAST && Int_yycheck[Int_yystate] == *Int_yyssp)    Int_yystate = Int_yytable[Int_yystate];  else    Int_yystate = Int_yydefgoto[Int_yyn - YYNTOKENS];  goto Int_yynewstate;/*------------------------------------.| Int_yyerrlab -- here on detecting error |`------------------------------------*/Int_yyerrlab:  /* If not already recovering from an error, report this error.  */  if (!Int_yyerrstatus)    {      ++Int_yynerrs;#if YYERROR_VERBOSE      Int_yyn = Int_yypact[Int_yystate];      if (YYPACT_NINF < Int_yyn && Int_yyn < YYLAST)	{	  YYSIZE_T Int_yysize = 0;	  int Int_yytype = YYTRANSLATE (Int_yychar);	  char *Int_yymsg;	  int Int_yyx, Int_yycount;	  Int_yycount = 0;	  /* Start YYX at -YYN if negative to avoid negative indexes in	     YYCHECK.  */	  for (Int_yyx = Int_yyn < 0 ? -Int_yyn : 0;	       Int_yyx < (int) (sizeof (Int_yytname) / sizeof (char *)); Int_yyx++)	    if (Int_yycheck[Int_yyx + Int_yyn] == Int_yyx && Int_yyx != YYTERROR)	      Int_yysize += Int_yystrlen (Int_yytname[Int_yyx]) + 15, Int_yycount++;	  Int_yysize += Int_yystrlen ("syntax error, unexpected ") + 1;	  Int_yysize += Int_yystrlen (Int_yytname[Int_yytype]);	  Int_yymsg = (char *) YYSTACK_ALLOC (Int_yysize);	  if (Int_yymsg != 0)	    {	      char *Int_yyp = Int_yystpcpy (Int_yymsg, "syntax error, unexpected ");	      Int_yyp = Int_yystpcpy (Int_yyp, Int_yytname[Int_yytype]);	      if (Int_yycount < 5)		{		  Int_yycount = 0;		  for (Int_yyx = Int_yyn < 0 ? -Int_yyn : 0;		       Int_yyx < (int) (sizeof (Int_yytname) / sizeof (char *));		       Int_yyx++)		    if (Int_yycheck[Int_yyx + Int_yyn] == Int_yyx && Int_yyx != YYTERROR)		      {			const char *Int_yyq = ! Int_yycount ? ", expecting " : " or ";			Int_yyp = Int_yystpcpy (Int_yyp, Int_yyq);			Int_yyp = Int_yystpcpy (Int_yyp, Int_yytname[Int_yyx]);			Int_yycount++;		      }		}	      Int_yyerror (Int_yymsg);	      YYSTACK_FREE (Int_yymsg);	    }	  else	    Int_yyerror ("syntax error; also virtual memory exhausted");	}      else#endif /* YYERROR_VERBOSE */	Int_yyerror ("syntax error");    }  if (Int_yyerrstatus == 3)    {      /* If just tried and failed to reuse lookahead token after an	 error, discard it.  */      /* Return failure if at end of input.  */      if (Int_yychar == YYEOF)        {	  /* Pop the error token.  */          YYPOPSTACK;	  /* Pop the rest of the stack.  */	  while (Int_yyss < Int_yyssp)	    {	      YYDSYMPRINTF ("Error: popping", Int_yystos[*Int_yyssp], Int_yyvsp, Int_yylsp);	      Int_yydestruct (Int_yystos[*Int_yyssp], Int_yyvsp);	      YYPOPSTACK;	    }	  YYABORT;        }      YYDSYMPRINTF ("Error: discarding", Int_yytoken, &Int_yylval, &Int_yylloc);      Int_yydestruct (Int_yytoken, &Int_yylval);      Int_yychar = YYEMPTY;    }  /* Else will try to reuse lookahead token after shifting the error     token.  */  goto Int_yyerrlab2;/*----------------------------------------------------.| Int_yyerrlab1 -- error raised explicitly by an action.  |`----------------------------------------------------*/Int_yyerrlab1:  /* Suppress GCC warning that Int_yyerrlab1 is unused when no action     invokes YYERROR.  */#if defined (__GNUC_MINOR__) && 2093 <= (__GNUC__ * 1000 + __GNUC_MINOR__)  __attribute__ ((__unused__))#endif  goto Int_yyerrlab2;/*---------------------------------------------------------------.| Int_yyerrlab2 -- pop states until the error token can be shifted.  |`---------------------------------------------------------------*/Int_yyerrlab2:  Int_yyerrstatus = 3;	/* Each real token shifted decrements this.  */  for (;;)    {      Int_yyn = Int_yypact[Int_yystate];      if (Int_yyn != YYPACT_NINF)	{	  Int_yyn += YYTERROR;	  if (0 <= Int_yyn && Int_yyn <= YYLAST && Int_yycheck[Int_yyn] == YYTERROR)	    {	      Int_yyn = Int_yytable[Int_yyn];	      if (0 < Int_yyn)		break;	    }	}      /* Pop the current state because it cannot handle the error token.  */      if (Int_yyssp == Int_yyss)	YYABORT;      YYDSYMPRINTF ("Error: popping", Int_yystos[*Int_yyssp], Int_yyvsp, Int_yylsp);      Int_yydestruct (Int_yystos[Int_yystate], Int_yyvsp);      Int_yyvsp--;      Int_yystate = *--Int_yyssp;      YY_STACK_PRINT (Int_yyss, Int_yyssp);    }  if (Int_yyn == YYFINAL)    YYACCEPT;  YYDPRINTF ((stderr, "Shifting error token, "));  *++Int_yyvsp = Int_yylval;  Int_yystate = Int_yyn;  goto Int_yynewstate;/*-------------------------------------.| Int_yyacceptlab -- YYACCEPT comes here.  |`-------------------------------------*/Int_yyacceptlab:  Int_yyresult = 0;  goto Int_yyreturn;/*-----------------------------------.| Int_yyabortlab -- YYABORT comes here.  |`-----------------------------------*/Int_yyabortlab:  Int_yyresult = 1;  goto Int_yyreturn;#ifndef Int_yyoverflow/*----------------------------------------------.| Int_yyoverflowlab -- parser overflow comes here.  |`----------------------------------------------*/Int_yyoverflowlab:  Int_yyerror ("parser stack overflow");  Int_yyresult = 2;  /* Fall through.  */#endifInt_yyreturn:#ifndef Int_yyoverflow  if (Int_yyss != Int_yyssa)    YYSTACK_FREE (Int_yyss);#endif  return Int_yyresult;}#line 364 "bootparse.y"#include "bootscanner.c"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -