7
7
*
8
8
*
9
9
* IDENTIFICATION
10
- * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.55 1997/11/25 22:06:14 momjian Exp $
10
+ * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.56 1997/12/11 17:36:42 momjian Exp $
11
11
*
12
12
* NOTES
13
13
* this is the "main" module of the postgres backend and
@@ -395,7 +395,7 @@ ReadCommand(char *inBuf, bool multiplexedBackend)
395
395
}
396
396
397
397
List *
398
- pg_plan (char * query_string , /* string to execute */
398
+ pg_parse_and_plan (char * query_string , /* string to execute */
399
399
Oid * typev , /* argument types */
400
400
int nargs , /* number of arguments */
401
401
QueryTreeList * * queryListP , /* pointer to the parse trees */
@@ -537,7 +537,10 @@ pg_plan(char *query_string, /* string to execute */
537
537
538
538
if (ShowPlannerStats )
539
539
ResetUsage ();
540
+
541
+ /* call that optimizer */
540
542
plan = planner (querytree );
543
+
541
544
if (ShowPlannerStats )
542
545
{
543
546
fprintf (stderr , "! Planner Stats:\n" );
@@ -580,7 +583,7 @@ pg_plan(char *query_string, /* string to execute */
580
583
}
581
584
582
585
/* ----------------------------------------------------------------
583
- * pg_eval ()
586
+ * pg_exec_query ()
584
587
*
585
588
* Takes a querystring, runs the parser/utilities or
586
589
* parser/planner/executor over it as necessary
@@ -597,13 +600,13 @@ pg_plan(char *query_string, /* string to execute */
597
600
*/
598
601
599
602
void
600
- pg_eval (char * query_string , char * * argv , Oid * typev , int nargs )
603
+ pg_exec_query (char * query_string , char * * argv , Oid * typev , int nargs )
601
604
{
602
- pg_eval_dest (query_string , argv , typev , nargs , whereToSendOutput );
605
+ pg_exec_query_dest (query_string , argv , typev , nargs , whereToSendOutput );
603
606
}
604
607
605
608
void
606
- pg_eval_dest (char * query_string ,/* string to execute */
609
+ pg_exec_query_dest (char * query_string ,/* string to execute */
607
610
char * * argv , /* arguments */
608
611
Oid * typev , /* argument types */
609
612
int nargs , /* number of arguments */
@@ -617,9 +620,9 @@ pg_eval_dest(char *query_string,/* string to execute */
617
620
QueryTreeList * querytree_list ;
618
621
619
622
/* plan the queries */
620
- plan_list = pg_plan (query_string , typev , nargs , & querytree_list , dest );
623
+ plan_list = pg_parse_and_plan (query_string , typev , nargs , & querytree_list , dest );
621
624
622
- /* pg_plan could have failed */
625
+ /* pg_parse_and_plan could have failed */
623
626
if (querytree_list == NULL )
624
627
return ;
625
628
@@ -668,7 +671,7 @@ pg_eval_dest(char *query_string,/* string to execute */
668
671
#ifdef INDEXSCAN_PATCH
669
672
670
673
/*
671
- * Print moved in pg_plan . DZ - 27-8-1996
674
+ * Print moved in pg_parse_and_plan . DZ - 27-8-1996
672
675
*/
673
676
#else
674
677
/* ----------------
@@ -1340,7 +1343,7 @@ PostgresMain(int argc, char *argv[])
1340
1343
if (IsUnderPostmaster == false)
1341
1344
{
1342
1345
puts ("\nPOSTGRES backend interactive interface" );
1343
- puts ("$Revision: 1.55 $ $Date: 1997/11/25 22:06:14 $" );
1346
+ puts ("$Revision: 1.56 $ $Date: 1997/12/11 17:36:42 $" );
1344
1347
}
1345
1348
1346
1349
/* ----------------
@@ -1510,7 +1513,7 @@ PostgresMain(int argc, char *argv[])
1510
1513
}
1511
1514
StartTransactionCommand ();
1512
1515
1513
- pg_eval (parser_input , (char * * ) NULL , (Oid * ) NULL , 0 );
1516
+ pg_exec_query (parser_input , (char * * ) NULL , (Oid * ) NULL , 0 );
1514
1517
1515
1518
if (ShowStats )
1516
1519
ShowUsage ();
@@ -1540,7 +1543,7 @@ PostgresMain(int argc, char *argv[])
1540
1543
* (3) commit the current transaction
1541
1544
*
1542
1545
* Note: if we had an empty input buffer, then we didn't
1543
- * call pg_eval , so we don't bother to commit this transaction.
1546
+ * call pg_exec_query , so we don't bother to commit this transaction.
1544
1547
* ----------------
1545
1548
*/
1546
1549
if (!IsEmptyQuery )
0 commit comments