preproc.c
上传用户:blenddy
上传日期:2007-01-07
资源大小:6495k
文件大小:764k
- case 383:
- #line 2259 "preproc.y"
- {
- yyval.str = cat3_str(make1_str("drop aggregate"), yyvsp[-1].str, yyvsp[0].str);
- ;
- break;}
- case 384:
- #line 2264 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 385:
- #line 2265 "preproc.y"
- { yyval.str = make1_str("*"); ;
- break;}
- case 386:
- #line 2270 "preproc.y"
- {
- yyval.str = cat3_str(make1_str("drop function"), yyvsp[-1].str, yyvsp[0].str);
- ;
- break;}
- case 387:
- #line 2277 "preproc.y"
- {
- yyval.str = cat3_str(make1_str("drop operator"), yyvsp[-3].str, make3_str(make1_str("("), yyvsp[-1].str, make1_str(")")));
- ;
- break;}
- case 390:
- #line 2284 "preproc.y"
- { yyval.str = make1_str("+"); ;
- break;}
- case 391:
- #line 2285 "preproc.y"
- { yyval.str = make1_str("-"); ;
- break;}
- case 392:
- #line 2286 "preproc.y"
- { yyval.str = make1_str("*"); ;
- break;}
- case 393:
- #line 2287 "preproc.y"
- { yyval.str = make1_str("%"); ;
- break;}
- case 394:
- #line 2288 "preproc.y"
- { yyval.str = make1_str("/"); ;
- break;}
- case 395:
- #line 2289 "preproc.y"
- { yyval.str = make1_str("<"); ;
- break;}
- case 396:
- #line 2290 "preproc.y"
- { yyval.str = make1_str(">"); ;
- break;}
- case 397:
- #line 2291 "preproc.y"
- { yyval.str = make1_str("="); ;
- break;}
- case 398:
- #line 2295 "preproc.y"
- {
- yyerror("parser: argument type missing (use NONE for unary operators)");
- ;
- break;}
- case 399:
- #line 2299 "preproc.y"
- { yyval.str = cat3_str(yyvsp[-2].str, make1_str(","), yyvsp[0].str); ;
- break;}
- case 400:
- #line 2301 "preproc.y"
- { yyval.str = cat2_str(make1_str("none,"), yyvsp[0].str); ;
- break;}
- case 401:
- #line 2303 "preproc.y"
- { yyval.str = cat2_str(yyvsp[-2].str, make1_str(", none")); ;
- break;}
- case 402:
- #line 2317 "preproc.y"
- {
- yyval.str = cat4_str(cat5_str(make1_str("alter table"), yyvsp[-6].str, yyvsp[-5].str, make1_str("rename"), yyvsp[-3].str), yyvsp[-2].str, make1_str("to"), yyvsp[0].str);
- ;
- break;}
- case 403:
- #line 2322 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 404:
- #line 2323 "preproc.y"
- { yyval.str = make1_str(""); ;
- break;}
- case 405:
- #line 2326 "preproc.y"
- { yyval.str = make1_str("colmunn"); ;
- break;}
- case 406:
- #line 2327 "preproc.y"
- { yyval.str = make1_str(""); ;
- break;}
- case 407:
- #line 2341 "preproc.y"
- { QueryIsRule=1; ;
- break;}
- case 408:
- #line 2344 "preproc.y"
- {
- yyval.str = cat2_str(cat5_str(cat5_str(make1_str("create rule"), yyvsp[-10].str, make1_str("as on"), yyvsp[-6].str, make1_str("to")), yyvsp[-4].str, yyvsp[-3].str, make1_str("do"), yyvsp[-1].str), yyvsp[0].str);
- ;
- break;}
- case 409:
- #line 2349 "preproc.y"
- { yyval.str = make1_str("nothing"); ;
- break;}
- case 410:
- #line 2350 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 411:
- #line 2351 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 412:
- #line 2352 "preproc.y"
- { yyval.str = cat3_str(make1_str("["), yyvsp[-1].str, make1_str("]")); ;
- break;}
- case 413:
- #line 2353 "preproc.y"
- { yyval.str = cat3_str(make1_str("("), yyvsp[-1].str, make1_str(")")); ;
- break;}
- case 414:
- #line 2356 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 415:
- #line 2357 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 416:
- #line 2361 "preproc.y"
- { yyval.str = cat2_str(yyvsp[-1].str, yyvsp[0].str); ;
- break;}
- case 417:
- #line 2363 "preproc.y"
- { yyval.str = cat3_str(yyvsp[-2].str, yyvsp[-1].str, make1_str(";")); ;
- break;}
- case 418:
- #line 2365 "preproc.y"
- { yyval.str = cat2_str(yyvsp[-1].str, make1_str(";")); ;
- break;}
- case 423:
- #line 2375 "preproc.y"
- {
- yyval.str = make3_str(yyvsp[-2].str, make1_str("."), yyvsp[0].str);
- ;
- break;}
- case 424:
- #line 2379 "preproc.y"
- {
- yyval.str = yyvsp[0].str;
- ;
- break;}
- case 425:
- #line 2385 "preproc.y"
- { yyval.str = make1_str("select"); ;
- break;}
- case 426:
- #line 2386 "preproc.y"
- { yyval.str = make1_str("update"); ;
- break;}
- case 427:
- #line 2387 "preproc.y"
- { yyval.str = make1_str("delete"); ;
- break;}
- case 428:
- #line 2388 "preproc.y"
- { yyval.str = make1_str("insert"); ;
- break;}
- case 429:
- #line 2391 "preproc.y"
- { yyval.str = make1_str("instead"); ;
- break;}
- case 430:
- #line 2392 "preproc.y"
- { yyval.str = make1_str(""); ;
- break;}
- case 431:
- #line 2405 "preproc.y"
- {
- yyval.str = cat2_str(make1_str("notify"), yyvsp[0].str);
- ;
- break;}
- case 432:
- #line 2411 "preproc.y"
- {
- yyval.str = cat2_str(make1_str("listen"), yyvsp[0].str);
- ;
- break;}
- case 433:
- #line 2417 "preproc.y"
- {
- yyval.str = cat2_str(make1_str("unlisten"), yyvsp[0].str);
- ;
- break;}
- case 434:
- #line 2421 "preproc.y"
- {
- yyval.str = make1_str("unlisten *");
- ;
- break;}
- case 435:
- #line 2438 "preproc.y"
- { yyval.str = make1_str("rollback"); ;
- break;}
- case 436:
- #line 2439 "preproc.y"
- { yyval.str = make1_str("begin transaction"); ;
- break;}
- case 437:
- #line 2440 "preproc.y"
- { yyval.str = make1_str("commit"); ;
- break;}
- case 438:
- #line 2441 "preproc.y"
- { yyval.str = make1_str("commit"); ;
- break;}
- case 439:
- #line 2442 "preproc.y"
- { yyval.str = make1_str("rollback"); ;
- break;}
- case 440:
- #line 2444 "preproc.y"
- { yyval.str = ""; ;
- break;}
- case 441:
- #line 2445 "preproc.y"
- { yyval.str = ""; ;
- break;}
- case 442:
- #line 2446 "preproc.y"
- { yyval.str = ""; ;
- break;}
- case 443:
- #line 2457 "preproc.y"
- {
- yyval.str = cat4_str(make1_str("create view"), yyvsp[-2].str, make1_str("as"), yyvsp[0].str);
- ;
- break;}
- case 444:
- #line 2471 "preproc.y"
- {
- yyval.str = cat2_str(make1_str("load"), yyvsp[0].str);
- ;
- break;}
- case 445:
- #line 2485 "preproc.y"
- {
- if (strlen(yyvsp[-1].str) == 0 || strlen(yyvsp[0].str) == 0)
- yyerror("CREATE DATABASE WITH requires at least an option");
- #ifndef MULTIBYTE
- if (strlen(yyvsp[0].str) != 0)
- yyerror("WITH ENCODING is not supported");
- #endif
- yyval.str = cat5_str(make1_str("create database"), yyvsp[-3].str, make1_str("with"), yyvsp[-1].str, yyvsp[0].str);
- ;
- break;}
- case 446:
- #line 2495 "preproc.y"
- {
- yyval.str = cat2_str(make1_str("create database"), yyvsp[0].str);
- ;
- break;}
- case 447:
- #line 2500 "preproc.y"
- { yyval.str = cat2_str(make1_str("location ="), yyvsp[0].str); ;
- break;}
- case 448:
- #line 2501 "preproc.y"
- { yyval.str = make1_str(""); ;
- break;}
- case 449:
- #line 2504 "preproc.y"
- { yyval.str = cat2_str(make1_str("encoding ="), yyvsp[0].str); ;
- break;}
- case 450:
- #line 2505 "preproc.y"
- { yyval.str = NULL; ;
- break;}
- case 451:
- #line 2508 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 452:
- #line 2509 "preproc.y"
- { yyval.str = make1_str("default"); ;
- break;}
- case 453:
- #line 2510 "preproc.y"
- { yyval.str = make1_str(""); ;
- break;}
- case 454:
- #line 2513 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 455:
- #line 2514 "preproc.y"
- { yyval.str = make1_str("default"); ;
- break;}
- case 456:
- #line 2515 "preproc.y"
- { yyval.str = make1_str(""); ;
- break;}
- case 457:
- #line 2526 "preproc.y"
- {
- yyval.str = cat2_str(make1_str("drop database"), yyvsp[0].str);
- ;
- break;}
- case 458:
- #line 2540 "preproc.y"
- {
- yyval.str = cat4_str(make1_str("cluster"), yyvsp[-2].str, make1_str("on"), yyvsp[0].str);
- ;
- break;}
- case 459:
- #line 2554 "preproc.y"
- {
- yyval.str = cat3_str(make1_str("vacuum"), yyvsp[-1].str, yyvsp[0].str);
- ;
- break;}
- case 460:
- #line 2558 "preproc.y"
- {
- if ( strlen(yyvsp[0].str) > 0 && strlen(yyvsp[-1].str) == 0 )
- yyerror("parser: syntax error at or near "("");
- yyval.str = cat5_str(make1_str("vacuum"), yyvsp[-3].str, yyvsp[-2].str, yyvsp[-1].str, yyvsp[0].str);
- ;
- break;}
- case 461:
- #line 2565 "preproc.y"
- { yyval.str = make1_str("verbose"); ;
- break;}
- case 462:
- #line 2566 "preproc.y"
- { yyval.str = make1_str(""); ;
- break;}
- case 463:
- #line 2569 "preproc.y"
- { yyval.str = make1_str("analyse"); ;
- break;}
- case 464:
- #line 2570 "preproc.y"
- { yyval.str = make1_str(""); ;
- break;}
- case 465:
- #line 2573 "preproc.y"
- { yyval.str = make3_str(make1_str("("), yyvsp[-1].str, make1_str(")")); ;
- break;}
- case 466:
- #line 2574 "preproc.y"
- { yyval.str = make1_str(""); ;
- break;}
- case 467:
- #line 2578 "preproc.y"
- { yyval.str=yyvsp[0].str; ;
- break;}
- case 468:
- #line 2580 "preproc.y"
- { yyval.str=cat3_str(yyvsp[-2].str, make1_str(","), yyvsp[0].str); ;
- break;}
- case 469:
- #line 2592 "preproc.y"
- {
- yyval.str = cat3_str(make1_str("explain"), yyvsp[-1].str, yyvsp[0].str);
- ;
- break;}
- case 476:
- #line 2632 "preproc.y"
- {
- yyval.str = cat3_str(make1_str("insert into"), yyvsp[-1].str, yyvsp[0].str);
- ;
- break;}
- case 477:
- #line 2638 "preproc.y"
- {
- yyval.str = make3_str(make1_str("values("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 478:
- #line 2642 "preproc.y"
- {
- yyval.str = make1_str("default values");
- ;
- break;}
- case 479:
- #line 2646 "preproc.y"
- {
- yyval.str = yyvsp[0].str;
- ;
- break;}
- case 480:
- #line 2650 "preproc.y"
- {
- yyval.str = make5_str(make1_str("("), yyvsp[-5].str, make1_str(") values ("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 481:
- #line 2654 "preproc.y"
- {
- yyval.str = make4_str(make1_str("("), yyvsp[-2].str, make1_str(")"), yyvsp[0].str);
- ;
- break;}
- case 482:
- #line 2659 "preproc.y"
- { yyval.str = make3_str(make1_str("("), yyvsp[-1].str, make1_str(")")); ;
- break;}
- case 483:
- #line 2660 "preproc.y"
- { yyval.str = make1_str(""); ;
- break;}
- case 484:
- #line 2665 "preproc.y"
- { yyval.str = cat3_str(yyvsp[-2].str, make1_str(","), yyvsp[0].str); ;
- break;}
- case 485:
- #line 2667 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 486:
- #line 2671 "preproc.y"
- {
- yyval.str = cat2_str(yyvsp[-1].str, yyvsp[0].str);
- ;
- break;}
- case 487:
- #line 2686 "preproc.y"
- {
- yyval.str = cat3_str(make1_str("delete from"), yyvsp[-1].str, yyvsp[0].str);
- ;
- break;}
- case 488:
- #line 2692 "preproc.y"
- {
- yyval.str = cat4_str(make1_str("lock"), yyvsp[-2].str, yyvsp[-1].str, yyvsp[0].str);
- ;
- break;}
- case 489:
- #line 2697 "preproc.y"
- { yyval.str = cat3_str(make1_str("in"), yyvsp[-1].str, make1_str("mode")); ;
- break;}
- case 490:
- #line 2698 "preproc.y"
- { yyval.str = make1_str("");;
- break;}
- case 491:
- #line 2701 "preproc.y"
- { yyval.str = make1_str("share row exclusive"); ;
- break;}
- case 492:
- #line 2702 "preproc.y"
- { yyval.str = cat2_str(make1_str("row"), yyvsp[0].str);;
- break;}
- case 493:
- #line 2703 "preproc.y"
- { yyval.str = cat2_str(make1_str("access"), yyvsp[0].str);;
- break;}
- case 494:
- #line 2704 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 495:
- #line 2707 "preproc.y"
- { yyval.str = make1_str("share"); ;
- break;}
- case 496:
- #line 2708 "preproc.y"
- { yyval.str = make1_str("exclusive"); ;
- break;}
- case 497:
- #line 2722 "preproc.y"
- {
- yyval.str = cat2_str(cat5_str(make1_str("update"), yyvsp[-4].str, make1_str("set"), yyvsp[-2].str, yyvsp[-1].str), yyvsp[0].str);
- ;
- break;}
- case 498:
- #line 2735 "preproc.y"
- { ForUpdateNotAllowed = 1; ;
- break;}
- case 499:
- #line 2737 "preproc.y"
- {
- struct cursor *ptr, *this;
-
- for (ptr = cur; ptr != NULL; ptr = ptr->next)
- {
- if (strcmp(yyvsp[-5].str, ptr->name) == 0)
- {
- /* re-definition is a bug */
- sprintf(errortext, "cursor %s already defined", yyvsp[-5].str);
- yyerror(errortext);
- }
- }
-
- this = (struct cursor *) mm_alloc(sizeof(struct cursor));
- /* initial definition */
- this->next = cur;
- this->name = yyvsp[-5].str;
- this->connection = connection;
- this->command = cat5_str(make1_str("declare"), mm_strdup(yyvsp[-5].str), yyvsp[-4].str, make1_str("cursor for"), yyvsp[0].str);
- this->argsinsert = argsinsert;
- this->argsresult = argsresult;
- argsinsert = argsresult = NULL;
-
- cur = this;
-
- yyval.str = cat3_str(make1_str("/*"), mm_strdup(this->command), make1_str("*/"));
- ;
- break;}
- case 500:
- #line 2767 "preproc.y"
- { yyval.str = make1_str("binary"); ;
- break;}
- case 501:
- #line 2768 "preproc.y"
- { yyval.str = make1_str("insensitive"); ;
- break;}
- case 502:
- #line 2769 "preproc.y"
- { yyval.str = make1_str("scroll"); ;
- break;}
- case 503:
- #line 2770 "preproc.y"
- { yyval.str = make1_str("insensitive scroll"); ;
- break;}
- case 504:
- #line 2771 "preproc.y"
- { yyval.str = make1_str(""); ;
- break;}
- case 505:
- #line 2789 "preproc.y"
- {
- if (strlen(yyvsp[-1].str) > 0 && ForUpdateNotAllowed != 0)
- yyerror("FOR UPDATE is not allowed in this context");
- ForUpdateNotAllowed = 0;
- yyval.str = cat4_str(yyvsp[-3].str, yyvsp[-2].str, yyvsp[-1].str, yyvsp[0].str);
- ;
- break;}
- case 506:
- #line 2806 "preproc.y"
- {
- yyval.str = make3_str(make1_str("("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 507:
- #line 2810 "preproc.y"
- {
- yyval.str = yyvsp[0].str;
- ;
- break;}
- case 508:
- #line 2814 "preproc.y"
- {
- yyval.str = cat3_str(yyvsp[-2].str, make1_str("except"), yyvsp[0].str);
- ForUpdateNotAllowed = 1;
- ;
- break;}
- case 509:
- #line 2819 "preproc.y"
- {
- yyval.str = cat4_str(yyvsp[-3].str, make1_str("union"), yyvsp[-1].str, yyvsp[0].str);
- ForUpdateNotAllowed = 1;
- ;
- break;}
- case 510:
- #line 2824 "preproc.y"
- {
- yyval.str = cat3_str(yyvsp[-3].str, make1_str("intersect"), yyvsp[-1].str);
- ForUpdateNotAllowed = 1;
- ;
- break;}
- case 511:
- #line 2834 "preproc.y"
- {
- yyval.str = cat4_str(cat5_str(make1_str("select"), yyvsp[-6].str, yyvsp[-5].str, yyvsp[-4].str, yyvsp[-3].str), yyvsp[-2].str, yyvsp[-1].str, yyvsp[0].str);
- if (strlen(yyvsp[-1].str) > 0 || strlen(yyvsp[0].str) > 0)
- ForUpdateNotAllowed = 1;
- ;
- break;}
- case 512:
- #line 2841 "preproc.y"
- { yyval.str= cat4_str(make1_str("into"), yyvsp[-2].str, yyvsp[-1].str, yyvsp[0].str); ;
- break;}
- case 513:
- #line 2842 "preproc.y"
- { yyval.str = make1_str(""); ;
- break;}
- case 514:
- #line 2843 "preproc.y"
- { yyval.str = make1_str(""); ;
- break;}
- case 515:
- #line 2846 "preproc.y"
- { yyval.str = make1_str("table"); ;
- break;}
- case 516:
- #line 2847 "preproc.y"
- { yyval.str = make1_str(""); ;
- break;}
- case 517:
- #line 2850 "preproc.y"
- { yyval.str = make1_str("all"); ;
- break;}
- case 518:
- #line 2851 "preproc.y"
- { yyval.str = make1_str(""); ;
- break;}
- case 519:
- #line 2854 "preproc.y"
- { yyval.str = make1_str("distinct"); ;
- break;}
- case 520:
- #line 2855 "preproc.y"
- { yyval.str = cat2_str(make1_str("distinct on"), yyvsp[0].str); ;
- break;}
- case 521:
- #line 2856 "preproc.y"
- { yyval.str = make1_str("all"); ;
- break;}
- case 522:
- #line 2857 "preproc.y"
- { yyval.str = make1_str(""); ;
- break;}
- case 523:
- #line 2860 "preproc.y"
- { yyval.str = cat2_str(make1_str("order by"), yyvsp[0].str); ;
- break;}
- case 524:
- #line 2861 "preproc.y"
- { yyval.str = make1_str(""); ;
- break;}
- case 525:
- #line 2864 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 526:
- #line 2865 "preproc.y"
- { yyval.str = cat3_str(yyvsp[-2].str, make1_str(","), yyvsp[0].str); ;
- break;}
- case 527:
- #line 2869 "preproc.y"
- {
- yyval.str = cat2_str(yyvsp[-1].str, yyvsp[0].str);
- ;
- break;}
- case 528:
- #line 2874 "preproc.y"
- { yyval.str = cat2_str(make1_str("using"), yyvsp[0].str); ;
- break;}
- case 529:
- #line 2875 "preproc.y"
- { yyval.str = make1_str("using <"); ;
- break;}
- case 530:
- #line 2876 "preproc.y"
- { yyval.str = make1_str("using >"); ;
- break;}
- case 531:
- #line 2877 "preproc.y"
- { yyval.str = make1_str("asc"); ;
- break;}
- case 532:
- #line 2878 "preproc.y"
- { yyval.str = make1_str("desc"); ;
- break;}
- case 533:
- #line 2879 "preproc.y"
- { yyval.str = make1_str(""); ;
- break;}
- case 534:
- #line 2883 "preproc.y"
- { yyval.str = cat4_str(make1_str("limit"), yyvsp[-2].str, make1_str(","), yyvsp[0].str); ;
- break;}
- case 535:
- #line 2885 "preproc.y"
- { yyval.str = cat4_str(make1_str("limit"), yyvsp[-2].str, make1_str("offset"), yyvsp[0].str); ;
- break;}
- case 536:
- #line 2887 "preproc.y"
- { yyval.str = cat2_str(make1_str("limit"), yyvsp[0].str); ;
- break;}
- case 537:
- #line 2889 "preproc.y"
- { yyval.str = cat4_str(make1_str("offset"), yyvsp[-2].str, make1_str("limit"), yyvsp[0].str); ;
- break;}
- case 538:
- #line 2891 "preproc.y"
- { yyval.str = cat2_str(make1_str("offset"), yyvsp[0].str); ;
- break;}
- case 539:
- #line 2893 "preproc.y"
- { yyval.str = make1_str(""); ;
- break;}
- case 540:
- #line 2896 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 541:
- #line 2897 "preproc.y"
- { yyval.str = make1_str("all"); ;
- break;}
- case 542:
- #line 2898 "preproc.y"
- { yyval.str = make_name(); ;
- break;}
- case 543:
- #line 2901 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 544:
- #line 2902 "preproc.y"
- { yyval.str = make_name(); ;
- break;}
- case 545:
- #line 2912 "preproc.y"
- { yyval.str = make1_str("*"); ;
- break;}
- case 546:
- #line 2913 "preproc.y"
- { yyval.str = make1_str(""); ;
- break;}
- case 547:
- #line 2916 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 548:
- #line 2919 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 549:
- #line 2921 "preproc.y"
- { yyval.str = cat3_str(yyvsp[-2].str, make1_str(","), yyvsp[0].str); ;
- break;}
- case 550:
- #line 2924 "preproc.y"
- { yyval.str = cat2_str(make1_str("group by"), yyvsp[0].str); ;
- break;}
- case 551:
- #line 2925 "preproc.y"
- { yyval.str = make1_str(""); ;
- break;}
- case 552:
- #line 2929 "preproc.y"
- {
- yyval.str = cat2_str(make1_str("having"), yyvsp[0].str);
- ;
- break;}
- case 553:
- #line 2932 "preproc.y"
- { yyval.str = make1_str(""); ;
- break;}
- case 554:
- #line 2936 "preproc.y"
- {
- yyval.str = make1_str("for update");
- ;
- break;}
- case 555:
- #line 2940 "preproc.y"
- {
- yyval.str = make1_str("for read only");
- ;
- break;}
- case 556:
- #line 2944 "preproc.y"
- {
- yyval.str = make1_str("");
- ;
- break;}
- case 557:
- #line 2949 "preproc.y"
- {
- yyval.str = cat2_str(make1_str("of"), yyvsp[0].str);
- ;
- break;}
- case 558:
- #line 2953 "preproc.y"
- {
- yyval.str = make1_str("");
- ;
- break;}
- case 559:
- #line 2967 "preproc.y"
- {
- yyval.str = cat2_str(make1_str("from"), yyvsp[0].str);
- ;
- break;}
- case 560:
- #line 2971 "preproc.y"
- {
- yyval.str = make1_str("");
- ;
- break;}
- case 561:
- #line 2977 "preproc.y"
- { yyval.str = make3_str(make1_str("("), yyvsp[-1].str, make1_str(")")); ;
- break;}
- case 562:
- #line 2979 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 563:
- #line 2981 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 564:
- #line 2985 "preproc.y"
- { yyval.str = make3_str(yyvsp[-2].str, make1_str(","), yyvsp[0].str); ;
- break;}
- case 565:
- #line 2987 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 566:
- #line 2991 "preproc.y"
- {
- yyval.str = cat3_str(yyvsp[-2].str, make1_str("as"), yyvsp[0].str);
- ;
- break;}
- case 567:
- #line 2995 "preproc.y"
- {
- yyval.str = cat2_str(yyvsp[-1].str, yyvsp[0].str);
- ;
- break;}
- case 568:
- #line 2999 "preproc.y"
- {
- yyval.str = yyvsp[0].str;
- ;
- break;}
- case 569:
- #line 3009 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 570:
- #line 3011 "preproc.y"
- { yyerror("UNION JOIN not yet implemented"); ;
- break;}
- case 571:
- #line 3015 "preproc.y"
- {
- yyval.str = cat2_str(yyvsp[-1].str, yyvsp[0].str);
- ;
- break;}
- case 572:
- #line 3021 "preproc.y"
- {
- yyval.str = cat2_str(yyvsp[-1].str, yyvsp[0].str);
- ;
- break;}
- case 573:
- #line 3025 "preproc.y"
- {
- yyval.str = yyvsp[0].str;
- ;
- break;}
- case 574:
- #line 3038 "preproc.y"
- {
- yyval.str = cat4_str(yyvsp[-3].str, make1_str("join"), yyvsp[-1].str, yyvsp[0].str);
- ;
- break;}
- case 575:
- #line 3042 "preproc.y"
- {
- yyval.str = cat4_str(make1_str("natural"), yyvsp[-2].str, make1_str("join"), yyvsp[0].str);
- ;
- break;}
- case 576:
- #line 3046 "preproc.y"
- { yyval.str = cat2_str(make1_str("cross join"), yyvsp[0].str); ;
- break;}
- case 577:
- #line 3051 "preproc.y"
- {
- yyval.str = cat2_str(make1_str("full"), yyvsp[0].str);
- fprintf(stderr,"FULL OUTER JOIN not yet implementedn");
- ;
- break;}
- case 578:
- #line 3056 "preproc.y"
- {
- yyval.str = cat2_str(make1_str("left"), yyvsp[0].str);
- fprintf(stderr,"LEFT OUTER JOIN not yet implementedn");
- ;
- break;}
- case 579:
- #line 3061 "preproc.y"
- {
- yyval.str = cat2_str(make1_str("right"), yyvsp[0].str);
- fprintf(stderr,"RIGHT OUTER JOIN not yet implementedn");
- ;
- break;}
- case 580:
- #line 3066 "preproc.y"
- {
- yyval.str = make1_str("outer");
- fprintf(stderr,"OUTER JOIN not yet implementedn");
- ;
- break;}
- case 581:
- #line 3071 "preproc.y"
- {
- yyval.str = make1_str("inner");
- ;
- break;}
- case 582:
- #line 3075 "preproc.y"
- {
- yyval.str = make1_str("");
- ;
- break;}
- case 583:
- #line 3080 "preproc.y"
- { yyval.str = make1_str("outer"); ;
- break;}
- case 584:
- #line 3081 "preproc.y"
- { yyval.str = make1_str(""); /* no qualifiers */ ;
- break;}
- case 585:
- #line 3092 "preproc.y"
- { yyval.str = make3_str(make1_str("using ("), yyvsp[-1].str, make1_str(")")); ;
- break;}
- case 586:
- #line 3093 "preproc.y"
- { yyval.str = cat2_str(make1_str("on"), yyvsp[0].str); ;
- break;}
- case 587:
- #line 3096 "preproc.y"
- { yyval.str = make3_str(yyvsp[-2].str, make1_str(","), yyvsp[0].str); ;
- break;}
- case 588:
- #line 3097 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 589:
- #line 3101 "preproc.y"
- {
- yyval.str = yyvsp[0].str;
- ;
- break;}
- case 590:
- #line 3106 "preproc.y"
- { yyval.str = cat2_str(make1_str("where"), yyvsp[0].str); ;
- break;}
- case 591:
- #line 3107 "preproc.y"
- { yyval.str = make1_str(""); /* no qualifiers */ ;
- break;}
- case 592:
- #line 3111 "preproc.y"
- {
- /* normal relations */
- yyval.str = yyvsp[0].str;
- ;
- break;}
- case 593:
- #line 3116 "preproc.y"
- {
- /* inheritance query */
- yyval.str = cat2_str(yyvsp[-1].str, make1_str("*"));
- ;
- break;}
- case 594:
- #line 3122 "preproc.y"
- {
- yyval.index.index1 = 0;
- yyval.index.index2 = yyvsp[0].index.index1;
- yyval.index.str = cat2_str(make1_str("[]"), yyvsp[0].index.str);
- ;
- break;}
- case 595:
- #line 3128 "preproc.y"
- {
- char *txt = mm_alloc(20L);
- sprintf (txt, "%d", yyvsp[-2].ival);
- yyval.index.index1 = yyvsp[-2].ival;
- yyval.index.index2 = yyvsp[0].index.index1;
- yyval.index.str = cat4_str(make1_str("["), txt, make1_str("]"), yyvsp[0].index.str);
- ;
- break;}
- case 596:
- #line 3137 "preproc.y"
- {
- yyval.index.index1 = -1;
- yyval.index.index2 = -1;
- yyval.index.str= make1_str("");
- ;
- break;}
- case 597:
- #line 3145 "preproc.y"
- {
- yyval.index.index1 = 0;
- yyval.index.index2 = yyvsp[0].index.index1;
- yyval.index.str = cat2_str(make1_str("[]"), yyvsp[0].index.str);
- ;
- break;}
- case 598:
- #line 3151 "preproc.y"
- {
- char *txt = mm_alloc(20L);
- sprintf (txt, "%d", yyvsp[-2].ival);
- yyval.index.index1 = yyvsp[-2].ival;
- yyval.index.index2 = yyvsp[0].index.index1;
- yyval.index.str = cat4_str(make1_str("["), txt, make1_str("]"), yyvsp[0].index.str);
- ;
- break;}
- case 599:
- #line 3160 "preproc.y"
- {
- yyval.index.index1 = -1;
- yyval.index.index2 = -1;
- yyval.index.str= make1_str("");
- ;
- break;}
- case 600:
- #line 3167 "preproc.y"
- { yyval.ival = atol(yyvsp[0].str); ;
- break;}
- case 601:
- #line 3168 "preproc.y"
- { yyval.ival = yyvsp[-1].ival; ;
- break;}
- case 602:
- #line 3169 "preproc.y"
- { yyval.ival = yyvsp[-2].ival + yyvsp[0].ival; ;
- break;}
- case 603:
- #line 3170 "preproc.y"
- { yyval.ival = yyvsp[-2].ival - yyvsp[0].ival; ;
- break;}
- case 604:
- #line 3171 "preproc.y"
- { yyval.ival = yyvsp[-2].ival * yyvsp[0].ival; ;
- break;}
- case 605:
- #line 3172 "preproc.y"
- { yyval.ival = yyvsp[-2].ival / yyvsp[0].ival; ;
- break;}
- case 606:
- #line 3173 "preproc.y"
- { yyval.ival = yyvsp[-2].ival % yyvsp[0].ival; ;
- break;}
- case 607:
- #line 3188 "preproc.y"
- {
- yyval.str = cat2_str(yyvsp[-1].str, yyvsp[0].index.str);
- ;
- break;}
- case 608:
- #line 3192 "preproc.y"
- {
- yyval.str = cat2_str(make1_str("setof"), yyvsp[0].str);
- ;
- break;}
- case 609:
- #line 3197 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 610:
- #line 3198 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 611:
- #line 3199 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 612:
- #line 3200 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 613:
- #line 3204 "preproc.y"
- {
- yyval.str = yyvsp[0].str;
- ;
- break;}
- case 614:
- #line 3209 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 615:
- #line 3210 "preproc.y"
- { yyval.str = make1_str("type"); ;
- break;}
- case 616:
- #line 3211 "preproc.y"
- { yyval.str = make1_str("at"); ;
- break;}
- case 617:
- #line 3212 "preproc.y"
- { yyval.str = make1_str("autocommit"); ;
- break;}
- case 618:
- #line 3213 "preproc.y"
- { yyval.str = make1_str("bool"); ;
- break;}
- case 619:
- #line 3214 "preproc.y"
- { yyval.str = make1_str("break"); ;
- break;}
- case 620:
- #line 3215 "preproc.y"
- { yyval.str = make1_str("call"); ;
- break;}
- case 621:
- #line 3216 "preproc.y"
- { yyval.str = make1_str("connect"); ;
- break;}
- case 622:
- #line 3217 "preproc.y"
- { yyval.str = make1_str("connection"); ;
- break;}
- case 623:
- #line 3218 "preproc.y"
- { yyval.str = make1_str("continue"); ;
- break;}
- case 624:
- #line 3219 "preproc.y"
- { yyval.str = make1_str("deallocate"); ;
- break;}
- case 625:
- #line 3220 "preproc.y"
- { yyval.str = make1_str("disconnect"); ;
- break;}
- case 626:
- #line 3221 "preproc.y"
- { yyval.str = make1_str("found"); ;
- break;}
- case 627:
- #line 3222 "preproc.y"
- { yyval.str = make1_str("go"); ;
- break;}
- case 628:
- #line 3223 "preproc.y"
- { yyval.str = make1_str("goto"); ;
- break;}
- case 629:
- #line 3224 "preproc.y"
- { yyval.str = make1_str("identified"); ;
- break;}
- case 630:
- #line 3225 "preproc.y"
- { yyval.str = make1_str("immediate"); ;
- break;}
- case 631:
- #line 3226 "preproc.y"
- { yyval.str = make1_str("indicator"); ;
- break;}
- case 632:
- #line 3227 "preproc.y"
- { yyval.str = make1_str("int"); ;
- break;}
- case 633:
- #line 3228 "preproc.y"
- { yyval.str = make1_str("long"); ;
- break;}
- case 634:
- #line 3229 "preproc.y"
- { yyval.str = make1_str("off"); ;
- break;}
- case 635:
- #line 3230 "preproc.y"
- { yyval.str = make1_str("open"); ;
- break;}
- case 636:
- #line 3231 "preproc.y"
- { yyval.str = make1_str("prepare"); ;
- break;}
- case 637:
- #line 3232 "preproc.y"
- { yyval.str = make1_str("release"); ;
- break;}
- case 638:
- #line 3233 "preproc.y"
- { yyval.str = make1_str("section"); ;
- break;}
- case 639:
- #line 3234 "preproc.y"
- { yyval.str = make1_str("short"); ;
- break;}
- case 640:
- #line 3235 "preproc.y"
- { yyval.str = make1_str("signed"); ;
- break;}
- case 641:
- #line 3236 "preproc.y"
- { yyval.str = make1_str("sqlerror"); ;
- break;}
- case 642:
- #line 3237 "preproc.y"
- { yyval.str = make1_str("sqlprint"); ;
- break;}
- case 643:
- #line 3238 "preproc.y"
- { yyval.str = make1_str("sqlwarning"); ;
- break;}
- case 644:
- #line 3239 "preproc.y"
- { yyval.str = make1_str("stop"); ;
- break;}
- case 645:
- #line 3240 "preproc.y"
- { yyval.str = make1_str("struct"); ;
- break;}
- case 646:
- #line 3241 "preproc.y"
- { yyval.str = make1_str("unsigned"); ;
- break;}
- case 647:
- #line 3242 "preproc.y"
- { yyval.str = make1_str("var"); ;
- break;}
- case 648:
- #line 3243 "preproc.y"
- { yyval.str = make1_str("whenever"); ;
- break;}
- case 649:
- #line 3252 "preproc.y"
- {
- yyval.str = cat2_str(make1_str("float"), yyvsp[0].str);
- ;
- break;}
- case 650:
- #line 3256 "preproc.y"
- {
- yyval.str = make1_str("double precision");
- ;
- break;}
- case 651:
- #line 3260 "preproc.y"
- {
- yyval.str = cat2_str(make1_str("decimal"), yyvsp[0].str);
- ;
- break;}
- case 652:
- #line 3264 "preproc.y"
- {
- yyval.str = cat2_str(make1_str("numeric"), yyvsp[0].str);
- ;
- break;}
- case 653:
- #line 3270 "preproc.y"
- { yyval.str = make1_str("float"); ;
- break;}
- case 654:
- #line 3272 "preproc.y"
- { yyval.str = make1_str("double precision"); ;
- break;}
- case 655:
- #line 3274 "preproc.y"
- { yyval.str = make1_str("decimal"); ;
- break;}
- case 656:
- #line 3276 "preproc.y"
- { yyval.str = make1_str("numeric"); ;
- break;}
- case 657:
- #line 3280 "preproc.y"
- {
- if (atol(yyvsp[-1].str) < 1)
- yyerror("precision for FLOAT must be at least 1");
- else if (atol(yyvsp[-1].str) >= 16)
- yyerror("precision for FLOAT must be less than 16");
- yyval.str = make3_str(make1_str("("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 658:
- #line 3288 "preproc.y"
- {
- yyval.str = make1_str("");
- ;
- break;}
- case 659:
- #line 3294 "preproc.y"
- {
- if (atol(yyvsp[-3].str) < 1 || atol(yyvsp[-3].str) > NUMERIC_MAX_PRECISION) {
- sprintf(errortext, "NUMERIC precision %s must be between 1 and %d", yyvsp[-3].str, NUMERIC_MAX_PRECISION);
- yyerror(errortext);
- }
- if (atol(yyvsp[-1].str) < 0 || atol(yyvsp[-1].str) > atol(yyvsp[-3].str)) {
- sprintf(errortext, "NUMERIC scale %s must be between 0 and precision %s", yyvsp[-1].str, yyvsp[-3].str);
- yyerror(errortext);
- }
- yyval.str = cat3_str(make2_str(make1_str("("), yyvsp[-3].str), make1_str(","), make2_str(yyvsp[-1].str, make1_str(")")));
- ;
- break;}
- case 660:
- #line 3306 "preproc.y"
- {
- if (atol(yyvsp[-1].str) < 1 || atol(yyvsp[-1].str) > NUMERIC_MAX_PRECISION) {
- sprintf(errortext, "NUMERIC precision %s must be between 1 and %d", yyvsp[-1].str, NUMERIC_MAX_PRECISION);
- yyerror(errortext);
- }
- yyval.str = make3_str(make1_str("("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 661:
- #line 3314 "preproc.y"
- {
- yyval.str = make1_str("");
- ;
- break;}
- case 662:
- #line 3320 "preproc.y"
- {
- if (atol(yyvsp[-3].str) < 1 || atol(yyvsp[-3].str) > NUMERIC_MAX_PRECISION) {
- sprintf(errortext, "NUMERIC precision %s must be between 1 and %d", yyvsp[-3].str, NUMERIC_MAX_PRECISION);
- yyerror(errortext);
- }
- if (atol(yyvsp[-1].str) < 0 || atol(yyvsp[-1].str) > atol(yyvsp[-3].str)) {
- sprintf(errortext, "NUMERIC scale %s must be between 0 and precision %s", yyvsp[-1].str, yyvsp[-3].str);
- yyerror(errortext);
- }
- yyval.str = cat3_str(make2_str(make1_str("("), yyvsp[-3].str), make1_str(","), make2_str(yyvsp[-1].str, make1_str(")")));
- ;
- break;}
- case 663:
- #line 3332 "preproc.y"
- {
- if (atol(yyvsp[-1].str) < 1 || atol(yyvsp[-1].str) > NUMERIC_MAX_PRECISION) {
- sprintf(errortext, "NUMERIC precision %s must be between 1 and %d", yyvsp[-1].str, NUMERIC_MAX_PRECISION);
- yyerror(errortext);
- }
- yyval.str = make3_str(make1_str("("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 664:
- #line 3340 "preproc.y"
- {
- yyval.str = make1_str("");
- ;
- break;}
- case 665:
- #line 3350 "preproc.y"
- {
- if (strncasecmp(yyvsp[-3].str, "char", strlen("char")) && strncasecmp(yyvsp[-3].str, "varchar", strlen("varchar")))
- yyerror("internal parsing error; unrecognized character type");
- if (atol(yyvsp[-1].str) < 1) {
- sprintf(errortext, "length for '%s' type must be at least 1",yyvsp[-3].str);
- yyerror(errortext);
- }
- else if (atol(yyvsp[-1].str) > MaxAttrSize) {
- sprintf(errortext, "length for type '%s' cannot exceed %ld",yyvsp[-3].str,(long) MaxAttrSize);
- yyerror(errortext);
- }
- yyval.str = cat2_str(yyvsp[-3].str, make3_str(make1_str("("), yyvsp[-1].str, make1_str(")")));
- ;
- break;}
- case 666:
- #line 3365 "preproc.y"
- {
- yyval.str = yyvsp[0].str;
- ;
- break;}
- case 667:
- #line 3371 "preproc.y"
- {
- if (strlen(yyvsp[0].str) > 0)
- fprintf(stderr, "COLLATE %s not yet implemented",yyvsp[0].str);
- yyval.str = cat4_str(make1_str("character"), yyvsp[-2].str, yyvsp[-1].str, yyvsp[0].str);
- ;
- break;}
- case 668:
- #line 3377 "preproc.y"
- { yyval.str = cat2_str(make1_str("char"), yyvsp[0].str); ;
- break;}
- case 669:
- #line 3378 "preproc.y"
- { yyval.str = make1_str("varchar"); ;
- break;}
- case 670:
- #line 3379 "preproc.y"
- { yyval.str = cat2_str(make1_str("national character"), yyvsp[0].str); ;
- break;}
- case 671:
- #line 3380 "preproc.y"
- { yyval.str = cat2_str(make1_str("nchar"), yyvsp[0].str); ;
- break;}
- case 672:
- #line 3383 "preproc.y"
- { yyval.str = make1_str("varying"); ;
- break;}
- case 673:
- #line 3384 "preproc.y"
- { yyval.str = make1_str(""); ;
- break;}
- case 674:
- #line 3387 "preproc.y"
- { yyval.str = cat2_str(make1_str("character set"), yyvsp[0].str); ;
- break;}
- case 675:
- #line 3388 "preproc.y"
- { yyval.str = make1_str(""); ;
- break;}
- case 676:
- #line 3391 "preproc.y"
- { yyval.str = cat2_str(make1_str("collate"), yyvsp[0].str); ;
- break;}
- case 677:
- #line 3392 "preproc.y"
- { yyval.str = make1_str(""); ;
- break;}
- case 678:
- #line 3396 "preproc.y"
- {
- yyval.str = yyvsp[0].str;
- ;
- break;}
- case 679:
- #line 3400 "preproc.y"
- {
- yyval.str = cat2_str(make1_str("timestamp"), yyvsp[0].str);
- ;
- break;}
- case 680:
- #line 3404 "preproc.y"
- {
- yyval.str = make1_str("time");
- ;
- break;}
- case 681:
- #line 3408 "preproc.y"
- {
- yyval.str = cat2_str(make1_str("interval"), yyvsp[0].str);
- ;
- break;}
- case 682:
- #line 3413 "preproc.y"
- { yyval.str = make1_str("year"); ;
- break;}
- case 683:
- #line 3414 "preproc.y"
- { yyval.str = make1_str("month"); ;
- break;}
- case 684:
- #line 3415 "preproc.y"
- { yyval.str = make1_str("day"); ;
- break;}
- case 685:
- #line 3416 "preproc.y"
- { yyval.str = make1_str("hour"); ;
- break;}
- case 686:
- #line 3417 "preproc.y"
- { yyval.str = make1_str("minute"); ;
- break;}
- case 687:
- #line 3418 "preproc.y"
- { yyval.str = make1_str("second"); ;
- break;}
- case 688:
- #line 3421 "preproc.y"
- { yyval.str = make1_str("with time zone"); ;
- break;}
- case 689:
- #line 3422 "preproc.y"
- { yyval.str = make1_str(""); ;
- break;}
- case 690:
- #line 3425 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 691:
- #line 3426 "preproc.y"
- { yyval.str = make1_str("year to #month"); ;
- break;}
- case 692:
- #line 3427 "preproc.y"
- { yyval.str = make1_str("day to hour"); ;
- break;}
- case 693:
- #line 3428 "preproc.y"
- { yyval.str = make1_str("day to minute"); ;
- break;}
- case 694:
- #line 3429 "preproc.y"
- { yyval.str = make1_str("day to second"); ;
- break;}
- case 695:
- #line 3430 "preproc.y"
- { yyval.str = make1_str("hour to minute"); ;
- break;}
- case 696:
- #line 3431 "preproc.y"
- { yyval.str = make1_str("minute to second"); ;
- break;}
- case 697:
- #line 3432 "preproc.y"
- { yyval.str = make1_str("hour to second"); ;
- break;}
- case 698:
- #line 3433 "preproc.y"
- { yyval.str = make1_str(""); ;
- break;}
- case 699:
- #line 3444 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 700:
- #line 3446 "preproc.y"
- {
- yyval.str = make1_str("null");
- ;
- break;}
- case 701:
- #line 3461 "preproc.y"
- {
- yyval.str = make5_str(make1_str("("), yyvsp[-5].str, make1_str(") in ("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 702:
- #line 3465 "preproc.y"
- {
- yyval.str = make5_str(make1_str("("), yyvsp[-6].str, make1_str(") not in ("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 703:
- #line 3469 "preproc.y"
- {
- yyval.str = make4_str(make5_str(make1_str("("), yyvsp[-6].str, make1_str(")"), yyvsp[-4].str, yyvsp[-3].str), make1_str("("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 704:
- #line 3473 "preproc.y"
- {
- yyval.str = make3_str(make5_str(make1_str("("), yyvsp[-5].str, make1_str(")"), yyvsp[-3].str, make1_str("(")), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 705:
- #line 3477 "preproc.y"
- {
- yyval.str = cat3_str(make3_str(make1_str("("), yyvsp[-5].str, make1_str(")")), yyvsp[-3].str, make3_str(make1_str("("), yyvsp[-1].str, make1_str(")")));
- ;
- break;}
- case 706:
- #line 3483 "preproc.y"
- {
- yyval.str = cat3_str(yyvsp[-2].str, make1_str(","), yyvsp[0].str);
- ;
- break;}
- case 707:
- #line 3488 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 708:
- #line 3489 "preproc.y"
- { yyval.str = "<"; ;
- break;}
- case 709:
- #line 3490 "preproc.y"
- { yyval.str = "="; ;
- break;}
- case 710:
- #line 3491 "preproc.y"
- { yyval.str = ">"; ;
- break;}
- case 711:
- #line 3492 "preproc.y"
- { yyval.str = "+"; ;
- break;}
- case 712:
- #line 3493 "preproc.y"
- { yyval.str = "-"; ;
- break;}
- case 713:
- #line 3494 "preproc.y"
- { yyval.str = "*"; ;
- break;}
- case 714:
- #line 3495 "preproc.y"
- { yyval.str = "%"; ;
- break;}
- case 715:
- #line 3496 "preproc.y"
- { yyval.str = "/"; ;
- break;}
- case 716:
- #line 3499 "preproc.y"
- { yyval.str = make1_str("ANY"); ;
- break;}
- case 717:
- #line 3500 "preproc.y"
- { yyval.str = make1_str("ALL"); ;
- break;}
- case 718:
- #line 3505 "preproc.y"
- {
- yyval.str = cat3_str(yyvsp[-2].str, make1_str(","), yyvsp[0].str);
- ;
- break;}
- case 719:
- #line 3509 "preproc.y"
- {
- yyval.str = yyvsp[0].str;
- ;
- break;}
- case 720:
- #line 3524 "preproc.y"
- {
- yyval.str = cat2_str(yyvsp[-1].str, yyvsp[0].str);
- ;
- break;}
- case 721:
- #line 3528 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 722:
- #line 3530 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 723:
- #line 3532 "preproc.y"
- {
- yyval.str = yyvsp[0].str;
- ;
- break;}
- case 724:
- #line 3536 "preproc.y"
- { yyval.str = cat2_str(make1_str("-"), yyvsp[0].str); ;
- break;}
- case 725:
- #line 3538 "preproc.y"
- { yyval.str = cat2_str(make1_str("%"), yyvsp[0].str); ;
- break;}
- case 726:
- #line 3540 "preproc.y"
- { yyval.str = cat2_str(yyvsp[-1].str, make1_str("%")); ;
- break;}
- case 727:
- #line 3542 "preproc.y"
- { yyval.str = cat3_str(yyvsp[-2].str, make1_str("+"), yyvsp[0].str); ;
- break;}
- case 728:
- #line 3544 "preproc.y"
- { yyval.str = cat3_str(yyvsp[-2].str, make1_str("-"), yyvsp[0].str); ;
- break;}
- case 729:
- #line 3546 "preproc.y"
- { yyval.str = cat3_str(yyvsp[-2].str, make1_str("/"), yyvsp[0].str); ;
- break;}
- case 730:
- #line 3548 "preproc.y"
- { yyval.str = cat3_str(yyvsp[-2].str, make1_str("%"), yyvsp[0].str); ;
- break;}
- case 731:
- #line 3550 "preproc.y"
- { yyval.str = cat3_str(yyvsp[-2].str, make1_str("*"), yyvsp[0].str); ;
- break;}
- case 732:
- #line 3552 "preproc.y"
- { yyval.str = cat3_str(yyvsp[-2].str, make1_str("<"), yyvsp[0].str); ;
- break;}
- case 733:
- #line 3554 "preproc.y"
- { yyval.str = cat3_str(yyvsp[-2].str, make1_str(">"), yyvsp[0].str); ;
- break;}
- case 734:
- #line 3556 "preproc.y"
- { yyval.str = cat2_str(yyvsp[-2].str, make1_str("= NULL")); ;
- break;}
- case 735:
- #line 3558 "preproc.y"
- { yyval.str = cat2_str(make1_str("= NULL"), yyvsp[0].str); ;
- break;}
- case 736:
- #line 3560 "preproc.y"
- { yyval.str = cat3_str(yyvsp[-2].str, make1_str("="), yyvsp[0].str); ;
- break;}
- case 737:
- #line 3565 "preproc.y"
- { yyval.str = cat2_str(make1_str(";"), yyvsp[0].str); ;
- break;}
- case 738:
- #line 3567 "preproc.y"
- { yyval.str = cat2_str(make1_str("|"), yyvsp[0].str); ;
- break;}
- case 739:
- #line 3569 "preproc.y"
- {
- yyval.str = cat3_str(yyvsp[-2].str, make1_str("::"), yyvsp[0].str);
- ;
- break;}
- case 740:
- #line 3573 "preproc.y"
- {
- yyval.str = cat3_str(make2_str(make1_str("cast("), yyvsp[-3].str), make1_str("as"), make2_str(yyvsp[-1].str, make1_str(")")));
- ;
- break;}
- case 741:
- #line 3577 "preproc.y"
- { yyval.str = make3_str(make1_str("("), yyvsp[-1].str, make1_str(")")); ;
- break;}
- case 742:
- #line 3579 "preproc.y"
- { yyval.str = cat3_str(yyvsp[-2].str, yyvsp[-1].str, yyvsp[0].str); ;
- break;}
- case 743:
- #line 3581 "preproc.y"
- { yyval.str = cat3_str(yyvsp[-2].str, make1_str("like"), yyvsp[0].str); ;
- break;}
- case 744:
- #line 3583 "preproc.y"
- { yyval.str = cat3_str(yyvsp[-3].str, make1_str("not like"), yyvsp[0].str); ;
- break;}
- case 745:
- #line 3585 "preproc.y"
- { yyval.str = cat2_str(yyvsp[-1].str, yyvsp[0].str); ;
- break;}
- case 746:
- #line 3587 "preproc.y"
- { yyval.str = cat2_str(yyvsp[-1].str, yyvsp[0].str); ;
- break;}
- case 747:
- #line 3589 "preproc.y"
- {
- yyval.str = cat2_str(yyvsp[-3].str, make1_str("(*)"));
- ;
- break;}
- case 748:
- #line 3593 "preproc.y"
- {
- yyval.str = cat2_str(yyvsp[-2].str, make1_str("()"));
- ;
- break;}
- case 749:
- #line 3597 "preproc.y"
- {
- yyval.str = make4_str(yyvsp[-3].str, make1_str("("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 750:
- #line 3601 "preproc.y"
- {
- yyval.str = make1_str("current_date");
- ;
- break;}
- case 751:
- #line 3605 "preproc.y"
- {
- yyval.str = make1_str("current_time");
- ;
- break;}
- case 752:
- #line 3609 "preproc.y"
- {
- if (atol(yyvsp[-1].str) != 0)
- fprintf(stderr,"CURRENT_TIME(%s) precision not implemented; zero used instead", yyvsp[-1].str);
- yyval.str = make1_str("current_time");
- ;
- break;}
- case 753:
- #line 3615 "preproc.y"
- {
- yyval.str = make1_str("current_timestamp");
- ;
- break;}
- case 754:
- #line 3619 "preproc.y"
- {
- if (atol(yyvsp[-1].str) != 0)
- fprintf(stderr,"CURRENT_TIMESTAMP(%s) precision not implemented; zero used instead",yyvsp[-1].str);
- yyval.str = make1_str("current_timestamp");
- ;
- break;}
- case 755:
- #line 3625 "preproc.y"
- {
- yyval.str = make1_str("current_user");
- ;
- break;}
- case 756:
- #line 3629 "preproc.y"
- {
- yyval.str = make1_str("user");
- ;
- break;}
- case 757:
- #line 3633 "preproc.y"
- {
- yyval.str = make3_str(make1_str("exists("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 758:
- #line 3637 "preproc.y"
- {
- yyval.str = make3_str(make1_str("extract("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 759:
- #line 3641 "preproc.y"
- {
- yyval.str = make3_str(make1_str("position("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 760:
- #line 3645 "preproc.y"
- {
- yyval.str = make3_str(make1_str("substring("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 761:
- #line 3650 "preproc.y"
- {
- yyval.str = make3_str(make1_str("trim(both"), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 762:
- #line 3654 "preproc.y"
- {
- yyval.str = make3_str(make1_str("trim(leading"), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 763:
- #line 3658 "preproc.y"
- {
- yyval.str = make3_str(make1_str("trim(trailing"), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 764:
- #line 3662 "preproc.y"
- {
- yyval.str = make3_str(make1_str("trim("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 765:
- #line 3666 "preproc.y"
- { yyval.str = cat2_str(yyvsp[-1].str, make1_str("isnull")); ;
- break;}
- case 766:
- #line 3668 "preproc.y"
- { yyval.str = cat2_str(yyvsp[-2].str, make1_str("is null")); ;
- break;}
- case 767:
- #line 3670 "preproc.y"
- { yyval.str = cat2_str(yyvsp[-1].str, make1_str("notnull")); ;
- break;}
- case 768:
- #line 3672 "preproc.y"
- { yyval.str = cat2_str(yyvsp[-3].str, make1_str("is not null")); ;
- break;}
- case 769:
- #line 3679 "preproc.y"
- {
- { yyval.str = cat2_str(yyvsp[-2].str, make1_str("is true")); }
- ;
- break;}
- case 770:
- #line 3683 "preproc.y"
- {
- { yyval.str = cat2_str(yyvsp[-3].str, make1_str("is not false")); }
- ;
- break;}
- case 771:
- #line 3687 "preproc.y"
- {
- { yyval.str = cat2_str(yyvsp[-2].str, make1_str("is false")); }
- ;
- break;}
- case 772:
- #line 3691 "preproc.y"
- {
- { yyval.str = cat2_str(yyvsp[-3].str, make1_str("is not true")); }
- ;
- break;}
- case 773:
- #line 3695 "preproc.y"
- {
- yyval.str = cat5_str(yyvsp[-4].str, make1_str("between"), yyvsp[-2].str, make1_str("and"), yyvsp[0].str);
- ;
- break;}
- case 774:
- #line 3699 "preproc.y"
- {
- yyval.str = cat5_str(yyvsp[-5].str, make1_str("not between"), yyvsp[-2].str, make1_str("and"), yyvsp[0].str);
- ;
- break;}
- case 775:
- #line 3703 "preproc.y"
- {
- yyval.str = make4_str(yyvsp[-4].str, make1_str(" in ("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 776:
- #line 3707 "preproc.y"
- {
- yyval.str = make4_str(yyvsp[-5].str, make1_str(" not in ("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 777:
- #line 3711 "preproc.y"
- {
- yyval.str = cat3_str(yyvsp[-4].str, yyvsp[-3].str, make3_str(make1_str("("), yyvsp[-1].str, make1_str(")")));
- ;
- break;}
- case 778:
- #line 3715 "preproc.y"
- {
- yyval.str = make4_str(yyvsp[-4].str, make1_str("+("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 779:
- #line 3719 "preproc.y"
- {
- yyval.str = make4_str(yyvsp[-4].str, make1_str("-("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 780:
- #line 3723 "preproc.y"
- {
- yyval.str = make4_str(yyvsp[-4].str, make1_str("/("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 781:
- #line 3727 "preproc.y"
- {
- yyval.str = make4_str(yyvsp[-4].str, make1_str("%("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 782:
- #line 3731 "preproc.y"
- {
- yyval.str = make4_str(yyvsp[-4].str, make1_str("*("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 783:
- #line 3735 "preproc.y"
- {
- yyval.str = make4_str(yyvsp[-4].str, make1_str("<("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 784:
- #line 3739 "preproc.y"
- {
- yyval.str = make4_str(yyvsp[-4].str, make1_str(">("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 785:
- #line 3743 "preproc.y"
- {
- yyval.str = make4_str(yyvsp[-4].str, make1_str("=("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 786:
- #line 3747 "preproc.y"
- {
- yyval.str = cat3_str(yyvsp[-5].str, yyvsp[-4].str, make3_str(make1_str("any("), yyvsp[-1].str, make1_str(")")));
- ;
- break;}
- case 787:
- #line 3751 "preproc.y"
- {
- yyval.str = make4_str(yyvsp[-5].str, make1_str("+ any("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 788:
- #line 3755 "preproc.y"
- {
- yyval.str = make4_str(yyvsp[-5].str, make1_str("- any("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 789:
- #line 3759 "preproc.y"
- {
- yyval.str = make4_str(yyvsp[-5].str, make1_str("/ any("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 790:
- #line 3763 "preproc.y"
- {
- yyval.str = make4_str(yyvsp[-5].str, make1_str("% any("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 791:
- #line 3767 "preproc.y"
- {
- yyval.str = make4_str(yyvsp[-5].str, make1_str("* any("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 792:
- #line 3771 "preproc.y"
- {
- yyval.str = make4_str(yyvsp[-5].str, make1_str("< any("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 793:
- #line 3775 "preproc.y"
- {
- yyval.str = make4_str(yyvsp[-5].str, make1_str("> any("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 794:
- #line 3779 "preproc.y"
- {
- yyval.str = make4_str(yyvsp[-5].str, make1_str("= any("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 795:
- #line 3783 "preproc.y"
- {
- yyval.str = cat3_str(yyvsp[-5].str, yyvsp[-4].str, make3_str(make1_str("all ("), yyvsp[-1].str, make1_str(")")));
- ;
- break;}
- case 796:
- #line 3787 "preproc.y"
- {
- yyval.str = make4_str(yyvsp[-5].str, make1_str("+ all("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 797:
- #line 3791 "preproc.y"
- {
- yyval.str = make4_str(yyvsp[-5].str, make1_str("- all("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 798:
- #line 3795 "preproc.y"
- {
- yyval.str = make4_str(yyvsp[-5].str, make1_str("/ all("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 799:
- #line 3799 "preproc.y"
- {
- yyval.str = make4_str(yyvsp[-5].str, make1_str("% all("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 800:
- #line 3803 "preproc.y"
- {
- yyval.str = make4_str(yyvsp[-5].str, make1_str("* all("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 801:
- #line 3807 "preproc.y"
- {
- yyval.str = make4_str(yyvsp[-5].str, make1_str("< all("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 802:
- #line 3811 "preproc.y"
- {
- yyval.str = make4_str(yyvsp[-5].str, make1_str("> all("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 803:
- #line 3815 "preproc.y"
- {
- yyval.str = make4_str(yyvsp[-5].str, make1_str("= all("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 804:
- #line 3819 "preproc.y"
- { yyval.str = cat3_str(yyvsp[-2].str, make1_str("and"), yyvsp[0].str); ;
- break;}
- case 805:
- #line 3821 "preproc.y"
- { yyval.str = cat3_str(yyvsp[-2].str, make1_str("or"), yyvsp[0].str); ;
- break;}
- case 806:
- #line 3823 "preproc.y"
- { yyval.str = cat2_str(make1_str("not"), yyvsp[0].str); ;
- break;}
- case 807:
- #line 3825 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 808:
- #line 3827 "preproc.y"
- { yyval.str = make1_str("?"); ;
- break;}
- case 809:
- #line 3836 "preproc.y"
- {
- yyval.str = cat2_str(yyvsp[-1].str, yyvsp[0].str);
- ;
- break;}
- case 810:
- #line 3840 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 811:
- #line 3842 "preproc.y"
- {
- yyval.str = yyvsp[0].str;
- ;
- break;}
- case 812:
- #line 3846 "preproc.y"
- { yyval.str = cat2_str(make1_str("-"), yyvsp[0].str); ;
- break;}
- case 813:
- #line 3848 "preproc.y"
- { yyval.str = cat2_str(make1_str("%"), yyvsp[0].str); ;
- break;}
- case 814:
- #line 3850 "preproc.y"
- { yyval.str = cat2_str(yyvsp[-1].str, make1_str("%")); ;
- break;}
- case 815:
- #line 3852 "preproc.y"
- { yyval.str = cat3_str(yyvsp[-2].str, make1_str("+"), yyvsp[0].str); ;
- break;}
- case 816:
- #line 3854 "preproc.y"
- { yyval.str = cat3_str(yyvsp[-2].str, make1_str("-"), yyvsp[0].str); ;
- break;}
- case 817:
- #line 3856 "preproc.y"
- { yyval.str = cat3_str(yyvsp[-2].str, make1_str("/"), yyvsp[0].str); ;
- break;}
- case 818:
- #line 3858 "preproc.y"
- { yyval.str = cat3_str(yyvsp[-2].str, make1_str("%"), yyvsp[0].str); ;
- break;}
- case 819:
- #line 3860 "preproc.y"
- { yyval.str = cat3_str(yyvsp[-2].str, make1_str("*"), yyvsp[0].str); ;
- break;}
- case 820:
- #line 3865 "preproc.y"
- { yyval.str = cat2_str(make1_str(";"), yyvsp[0].str); ;
- break;}
- case 821:
- #line 3867 "preproc.y"
- { yyval.str = cat2_str(make1_str("|"), yyvsp[0].str); ;
- break;}
- case 822:
- #line 3869 "preproc.y"
- {
- yyval.str = cat3_str(yyvsp[-2].str, make1_str("::"), yyvsp[0].str);
- ;
- break;}
- case 823:
- #line 3873 "preproc.y"
- {
- yyval.str = cat3_str(make2_str(make1_str("cast("), yyvsp[-3].str), make1_str("as"), make2_str(yyvsp[-1].str, make1_str(")")));
- ;
- break;}
- case 824:
- #line 3877 "preproc.y"
- { yyval.str = make3_str(make1_str("("), yyvsp[-1].str, make1_str(")")); ;
- break;}
- case 825:
- #line 3879 "preproc.y"
- { yyval.str = cat3_str(yyvsp[-2].str, yyvsp[-1].str, yyvsp[0].str); ;
- break;}
- case 826:
- #line 3881 "preproc.y"
- { yyval.str = cat2_str(yyvsp[-1].str, yyvsp[0].str); ;
- break;}
- case 827:
- #line 3883 "preproc.y"
- { yyval.str = cat2_str(yyvsp[-1].str, yyvsp[0].str); ;
- break;}
- case 828:
- #line 3885 "preproc.y"
- {
- yyval.str = cat2_str(yyvsp[-2].str, make1_str("()"));
- ;
- break;}
- case 829:
- #line 3889 "preproc.y"
- {
- yyval.str = make4_str(yyvsp[-3].str, make1_str("("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 830:
- #line 3893 "preproc.y"
- {
- yyval.str = make1_str("current_date");
- ;
- break;}
- case 831:
- #line 3897 "preproc.y"
- {
- yyval.str = make1_str("current_time");
- ;
- break;}
- case 832:
- #line 3901 "preproc.y"
- {
- if (yyvsp[-1].str != 0)
- fprintf(stderr,"CURRENT_TIME(%s) precision not implemented; zero used instead", yyvsp[-1].str);
- yyval.str = make1_str("current_time");
- ;
- break;}
- case 833:
- #line 3907 "preproc.y"
- {
- yyval.str = make1_str("current_timestamp");
- ;
- break;}
- case 834:
- #line 3911 "preproc.y"
- {
- if (atol(yyvsp[-1].str) != 0)
- fprintf(stderr,"CURRENT_TIMESTAMP(%s) precision not implemented; zero used instead",yyvsp[-1].str);
- yyval.str = make1_str("current_timestamp");
- ;
- break;}
- case 835:
- #line 3917 "preproc.y"
- {
- yyval.str = make1_str("current_user");
- ;
- break;}
- case 836:
- #line 3921 "preproc.y"
- {
- yyval.str = make1_str("user");
- ;
- break;}
- case 837:
- #line 3925 "preproc.y"
- {
- yyval.str = make3_str(make1_str("position ("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 838:
- #line 3929 "preproc.y"
- {
- yyval.str = make3_str(make1_str("substring ("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 839:
- #line 3934 "preproc.y"
- {
- yyval.str = make3_str(make1_str("trim(both"), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 840:
- #line 3938 "preproc.y"
- {
- yyval.str = make3_str(make1_str("trim(leading"), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 841:
- #line 3942 "preproc.y"
- {
- yyval.str = make3_str(make1_str("trim(trailing"), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 842:
- #line 3946 "preproc.y"
- {
- yyval.str = make3_str(make1_str("trim("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 843:
- #line 3950 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 844:
- #line 3954 "preproc.y"
- {
- yyval.str = cat4_str(make1_str("["), yyvsp[-2].str, make1_str("]"), yyvsp[0].str);
- ;
- break;}
- case 845:
- #line 3958 "preproc.y"
- {
- yyval.str = cat2_str(cat5_str(make1_str("["), yyvsp[-4].str, make1_str(":"), yyvsp[-2].str, make1_str("]")), yyvsp[0].str);
- ;
- break;}
- case 846:
- #line 3962 "preproc.y"
- { yyval.str = make1_str(""); ;
- break;}
- case 847:
- #line 3966 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 848:
- #line 3968 "preproc.y"
- { yyval.str = cat3_str(yyvsp[-2].str, make1_str(","), yyvsp[0].str); ;
- break;}
- case 849:
- #line 3970 "preproc.y"
- { yyval.str = cat3_str(yyvsp[-2].str, make1_str("using"), yyvsp[0].str); ;
- break;}
- case 850:
- #line 3974 "preproc.y"
- {
- yyval.str = cat3_str(yyvsp[-2].str, make1_str("from"), yyvsp[0].str);
- ;
- break;}
- case 851:
- #line 3978 "preproc.y"
- { yyval.str = make1_str(""); ;
- break;}
- case 852:
- #line 3980 "preproc.y"
- { yyval.str = make1_str("?"); ;
- break;}
- case 853:
- #line 3983 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 854:
- #line 3984 "preproc.y"
- { yyval.str = make1_str("timezone_hour"); ;
- break;}
- case 855:
- #line 3985 "preproc.y"
- { yyval.str = make1_str("timezone_minute"); ;
- break;}
- case 856:
- #line 3989 "preproc.y"
- { yyval.str = cat3_str(yyvsp[-2].str, make1_str("in"), yyvsp[0].str); ;
- break;}
- case 857:
- #line 3991 "preproc.y"
- { yyval.str = make1_str(""); ;
- break;}
- case 858:
- #line 3995 "preproc.y"
- {
- yyval.str = cat2_str(yyvsp[-1].str, yyvsp[0].str);
- ;
- break;}
- case 859:
- #line 3999 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 860:
- #line 4001 "preproc.y"
- { yyval.str = cat2_str(make1_str("-"), yyvsp[0].str); ;
- break;}
- case 861:
- #line 4003 "preproc.y"
- { yyval.str = cat3_str(yyvsp[-2].str, make1_str("+"), yyvsp[0].str); ;
- break;}
- case 862:
- #line 4005 "preproc.y"
- { yyval.str = cat3_str(yyvsp[-2].str, make1_str("-"), yyvsp[0].str); ;
- break;}
- case 863:
- #line 4007 "preproc.y"
- { yyval.str = cat3_str(yyvsp[-2].str, make1_str("/"), yyvsp[0].str); ;
- break;}
- case 864:
- #line 4009 "preproc.y"
- { yyval.str = cat3_str(yyvsp[-2].str, make1_str("%"), yyvsp[0].str); ;
- break;}
- case 865:
- #line 4011 "preproc.y"
- { yyval.str = cat3_str(yyvsp[-2].str, make1_str("*"), yyvsp[0].str); ;
- break;}
- case 866:
- #line 4013 "preproc.y"
- { yyval.str = cat2_str(make1_str("|"), yyvsp[0].str); ;
- break;}
- case 867:
- #line 4015 "preproc.y"
- {
- yyval.str = cat3_str(yyvsp[-2].str, make1_str("::"), yyvsp[0].str);
- ;
- break;}
- case 868:
- #line 4019 "preproc.y"
- {
- yyval.str = cat3_str(make2_str(make1_str("cast("), yyvsp[-3].str), make1_str("as"), make2_str(yyvsp[-1].str, make1_str(")")));
- ;
- break;}
- case 869:
- #line 4023 "preproc.y"
- { yyval.str = make3_str(make1_str("("), yyvsp[-1].str, make1_str(")")); ;
- break;}
- case 870:
- #line 4025 "preproc.y"
- { yyval.str = cat3_str(yyvsp[-2].str, yyvsp[-1].str, yyvsp[0].str); ;
- break;}
- case 871:
- #line 4027 "preproc.y"
- { yyval.str = cat2_str(yyvsp[-1].str, yyvsp[0].str); ;
- break;}
- case 872:
- #line 4029 "preproc.y"
- { yyval.str = cat2_str(yyvsp[-1].str, yyvsp[0].str); ;
- break;}
- case 873:
- #line 4031 "preproc.y"
- {
- yyval.str = yyvsp[0].str;
- ;
- break;}
- case 874:
- #line 4035 "preproc.y"
- {
- yyval.str = cat2_str(yyvsp[-2].str, make1_str("()"));
- ;
- break;}
- case 875:
- #line 4039 "preproc.y"
- {
- yyval.str = make4_str(yyvsp[-3].str, make1_str("("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 876:
- #line 4043 "preproc.y"
- {
- yyval.str = make3_str(make1_str("position("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 877:
- #line 4047 "preproc.y"
- {
- yyval.str = make3_str(make1_str("substring("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 878:
- #line 4052 "preproc.y"
- {
- yyval.str = make3_str(make1_str("trim(both"), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 879:
- #line 4056 "preproc.y"
- {
- yyval.str = make3_str(make1_str("trim(leading"), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 880:
- #line 4060 "preproc.y"
- {
- yyval.str = make3_str(make1_str("trim(trailing"), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 881:
- #line 4064 "preproc.y"
- {
- yyval.str = make3_str(make1_str("trim("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 882:
- #line 4070 "preproc.y"
- {
- yyval.str = cat3_str(yyvsp[-2].str, yyvsp[-1].str, yyvsp[0].str);
- ;
- break;}
- case 883:
- #line 4074 "preproc.y"
- { yyval.str = make1_str(""); ;
- break;}
- case 884:
- #line 4078 "preproc.y"
- { yyval.str = cat2_str(make1_str("from"), yyvsp[0].str); ;
- break;}
- case 885:
- #line 4080 "preproc.y"
- {
- yyval.str = make1_str("");
- ;
- break;}
- case 886:
- #line 4086 "preproc.y"
- { yyval.str = cat2_str(make1_str("for"), yyvsp[0].str); ;
- break;}
- case 887:
- #line 4088 "preproc.y"
- { yyval.str = make1_str(""); ;
- break;}
- case 888:
- #line 4092 "preproc.y"
- { yyval.str = cat3_str(yyvsp[-2].str, make1_str("from"), yyvsp[0].str); ;
- break;}
- case 889:
- #line 4094 "preproc.y"
- { yyval.str = cat2_str(make1_str("from"), yyvsp[0].str); ;
- break;}
- case 890:
- #line 4096 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 891:
- #line 4100 "preproc.y"
- {
- yyval.str = yyvsp[0].str;
- ;
- break;}
- case 892:
- #line 4104 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 893:
- #line 4108 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 894:
- #line 4110 "preproc.y"
- { yyval.str = cat3_str(yyvsp[-2].str, make1_str(","), yyvsp[0].str);;
- break;}
- case 895:
- #line 4114 "preproc.y"
- {
- yyval.str = yyvsp[0].str;
- ;
- break;}
- case 896:
- #line 4118 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 897:
- #line 4122 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 898:
- #line 4124 "preproc.y"
- { yyval.str = cat3_str(yyvsp[-2].str, make1_str(","), yyvsp[0].str);;
- break;}
- case 899:
- #line 4143 "preproc.y"
- { yyval.str = cat5_str(make1_str("case"), yyvsp[-3].str, yyvsp[-2].str, yyvsp[-1].str, make1_str("end")); ;
- break;}
- case 900:
- #line 4145 "preproc.y"
- {
- yyval.str = cat5_str(make1_str("nullif("), yyvsp[-3].str, make1_str(","), yyvsp[-1].str, make1_str(")"));
- fprintf(stderr, "NULLIF() not yet fully implemented");
- ;
- break;}
- case 901:
- #line 4151 "preproc.y"
- {
- yyval.str = cat3_str(make1_str("coalesce("), yyvsp[-1].str, make1_str(")"));
- ;
- break;}
- case 902:
- #line 4157 "preproc.y"
- { yyval.str = cat2_str(yyvsp[-1].str, yyvsp[0].str); ;
- break;}
- case 903:
- #line 4159 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 904:
- #line 4163 "preproc.y"
- {
- yyval.str = cat4_str(make1_str("when"), yyvsp[-2].str, make1_str("then"), yyvsp[0].str);
- ;
- break;}
- case 905:
- #line 4168 "preproc.y"
- { yyval.str = cat2_str(make1_str("else"), yyvsp[0].str); ;
- break;}
- case 906:
- #line 4169 "preproc.y"
- { yyval.str = make1_str(""); ;
- break;}
- case 907:
- #line 4173 "preproc.y"
- {
- yyval.str = cat2_str(yyvsp[-1].str, yyvsp[0].str);
- ;
- break;}
- case 908:
- #line 4177 "preproc.y"
- {
- yyval.str = yyvsp[0].str;
- ;
- break;}
- case 909:
- #line 4181 "preproc.y"
- { yyval.str = make1_str(""); ;
- break;}
- case 910:
- #line 4185 "preproc.y"
- {
- yyval.str = make3_str(yyvsp[-2].str, make1_str("."), yyvsp[0].str);
- ;
- break;}
- case 911:
- #line 4189 "preproc.y"
- {
- yyval.str = make3_str(yyvsp[-2].str, make1_str("."), yyvsp[0].str);
- ;
- break;}
- case 912:
- #line 4195 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 913:
- #line 4197 "preproc.y"
- { yyval.str = make3_str(yyvsp[-2].str, make1_str("."), yyvsp[0].str); ;
- break;}
- case 914:
- #line 4199 "preproc.y"
- { yyval.str = make2_str(yyvsp[-2].str, make1_str(".*")); ;
- break;}
- case 915:
- #line 4210 "preproc.y"
- { yyval.str = cat3_str(yyvsp[-2].str, make1_str(","),yyvsp[0].str); ;
- break;}
- case 916:
- #line 4212 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 917:
- #line 4213 "preproc.y"
- { yyval.str = make1_str("*"); ;
- break;}
- case 918:
- #line 4217 "preproc.y"
- {
- yyval.str = cat4_str(yyvsp[-3].str, yyvsp[-2].str, make1_str("="), yyvsp[0].str);
- ;
- break;}
- case 919:
- #line 4221 "preproc.y"
- {
- yyval.str = cat2_str(yyvsp[-1].str, yyvsp[0].str);
- ;
- break;}
- case 920:
- #line 4225 "preproc.y"
- {
- yyval.str = make2_str(yyvsp[-2].str, make1_str(".*"));
- ;
- break;}
- case 921:
- #line 4236 "preproc.y"
- { yyval.str = cat3_str(yyvsp[-2].str, make1_str(","), yyvsp[0].str); ;
- break;}
- case 922:
- #line 4238 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 923:
- #line 4243 "preproc.y"
- {
- yyval.str = cat3_str(yyvsp[-2].str, make1_str("as"), yyvsp[0].str);
- ;
- break;}
- case 924:
- #line 4247 "preproc.y"
- {
- yyval.str = yyvsp[0].str;
- ;
- break;}
- case 925:
- #line 4251 "preproc.y"
- {
- yyval.str = make2_str(yyvsp[-2].str, make1_str(".*"));
- ;
- break;}
- case 926:
- #line 4255 "preproc.y"
- {
- yyval.str = make1_str("*");
- ;
- break;}
- case 927:
- #line 4260 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 928:
- #line 4261 "preproc.y"
- { yyval.str = make1_str(""); ;
- break;}
- case 929:
- #line 4265 "preproc.y"
- {
- yyval.str = yyvsp[0].str;
- ;
- break;}
- case 930:
- #line 4269 "preproc.y"
- {
- /* disallow refs to variable system tables */
- if (strcmp(LogRelationName, yyvsp[0].str) == 0
- || strcmp(VariableRelationName, yyvsp[0].str) == 0) {
- sprintf(errortext, make1_str("%s cannot be accessed by users"),yyvsp[0].str);
- yyerror(errortext);
- }
- else
- yyval.str = yyvsp[0].str;
- ;
- break;}
- case 931:
- #line 4281 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 932:
- #line 4282 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 933:
- #line 4283 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 934:
- #line 4284 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 935:
- #line 4285 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 936:
- #line 4291 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 937:
- #line 4292 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 938:
- #line 4294 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 939:
- #line 4301 "preproc.y"
- {
- yyval.str = yyvsp[0].str;
- ;
- break;}
- case 940:
- #line 4305 "preproc.y"
- {
- yyval.str = yyvsp[0].str;
- ;
- break;}
- case 941:
- #line 4309 "preproc.y"
- {
- yyval.str = yyvsp[0].str;
- ;
- break;}
- case 942:
- #line 4313 "preproc.y"
- {
- yyval.str = cat2_str(yyvsp[-1].str, yyvsp[0].str);
- ;
- break;}
- case 943:
- #line 4317 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 944:
- #line 4319 "preproc.y"
- {
- yyval.str = make1_str("true");
- ;
- break;}
- case 945:
- #line 4323 "preproc.y"
- {
- yyval.str = make1_str("false");
- ;
- break;}
- case 946:
- #line 4329 "preproc.y"
- {
- yyval.str = cat2_str(make_name(), yyvsp[0].str);
- ;
- break;}
- case 947:
- #line 4334 "preproc.y"
- { yyval.str = make_name();;
- break;}
- case 948:
- #line 4335 "preproc.y"
- { yyval.str = make_name();;
- break;}
- case 949:
- #line 4336 "preproc.y"
- {
- yyval.str = (char *)mm_alloc(strlen(yyvsp[0].str) + 3);
- yyval.str[0]=''';
- strcpy(yyval.str+1, yyvsp[0].str);
- yyval.str[strlen(yyvsp[0].str)+2]=' ';
- yyval.str[strlen(yyvsp[0].str)+1]=''';
- free(yyvsp[0].str);
- ;
- break;}
- case 950:
- #line 4344 "preproc.y"
- { yyval.str = yyvsp[0].str;;
- break;}
- case 951:
- #line 4352 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 952:
- #line 4354 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 953:
- #line 4356 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 954:
- #line 4366 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 955:
- #line 4367 "preproc.y"
- { yyval.str = yyvsp[0].str; ;
- break;}
- case 956:
- #line 4368 "preproc.y"
- { yyval.str = make1_str("absolute"); ;
- break;}
- case 957:
- #line 4369 "preproc.y"
- { yyval.str = make1_str("access"); ;
- break;}
- case 958:
- #line 4370 "preproc.y"
- { yyval.str = make1_str("action"); ;
- break;}
- case 959:
- #line 4371 "preproc.y"
- { yyval.str = make1_str("after"); ;
- break;}
- case 960:
- #line 4372 "preproc.y"
- { yyval.str = make1_str("aggregate"); ;
- break;}
- case 961:
- #line 4373 "preproc.y"
- { yyval.str = make1_str("backward"); ;
- break;}
- case 962:
- #line 4374 "preproc.y"
- { yyval.str = make1_str("before"); ;
- break;}