Skip to content

Commit a834cbe

Browse files
committed
> I'm not sure why NDirectFileRead/NDirectFileWrite are unused at the
> moment, but they used to be used; I think the correct response is to > put back the missing counter increments, not rip out the counters. Ok, fair enough. It's worth noting that they've been broken for a while -- for example, the HashJoin counter increments were broken when you comitted r1.20 of executor/nodeHashJoin.c in May of '99. I've attached a revised patch that doesn't remove the counters (but doesn't increment them either: I'm not sure of all the places where the counter should be incremented). Neil Conway
1 parent 708a000 commit a834cbe

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

src/backend/commands/prepare.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Copyright (c) 2002, PostgreSQL Global Development Group
77
*
88
* IDENTIFICATION
9-
* $Header: /cvsroot/pgsql/src/backend/commands/prepare.c,v 1.3 2002/09/14 19:59:20 tgl Exp $
9+
* $Header: /cvsroot/pgsql/src/backend/commands/prepare.c,v 1.4 2002/09/20 03:45:08 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -76,14 +76,7 @@ PrepareQuery(PrepareStmt *stmt)
7676
Query *query = (Query *) lfirst(query_list_item);
7777
Plan *plan;
7878

79-
/* We can't generate plans for utility statements. */
80-
if (query->commandType == CMD_UTILITY)
81-
plan = NULL;
82-
else
83-
{
84-
/* Call the query planner to generate a plan. */
85-
plan = planner(query);
86-
}
79+
plan = pg_plan_query(query);
8780

8881
plan_list = lappend(plan_list, plan);
8982
}

src/backend/tcop/postgres.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.292 2002/09/16 01:24:41 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.293 2002/09/20 03:45:08 momjian Exp $
1212
*
1313
* NOTES
1414
* this is the "main" module of the postgres backend and
@@ -486,7 +486,7 @@ pg_plan_query(Query *querytree)
486486
if (Show_planner_stats)
487487
ResetUsage();
488488

489-
/* call that optimizer */
489+
/* call the optimizer */
490490
plan = planner(querytree);
491491

492492
if (Show_planner_stats)
@@ -1691,7 +1691,7 @@ PostgresMain(int argc, char *argv[], const char *username)
16911691
if (!IsUnderPostmaster)
16921692
{
16931693
puts("\nPOSTGRES backend interactive interface ");
1694-
puts("$Revision: 1.292 $ $Date: 2002/09/16 01:24:41 $\n");
1694+
puts("$Revision: 1.293 $ $Date: 2002/09/20 03:45:08 $\n");
16951695
}
16961696

16971697
/*
@@ -2080,7 +2080,7 @@ ShowUsage(const char *title)
20802080
#endif /* HAVE_GETRUSAGE */
20812081

20822082
bufusage = ShowBufferUsage();
2083-
appendStringInfo(&str, "! postgres usage stats:\n%s", bufusage);
2083+
appendStringInfo(&str, "! buffer usage stats:\n%s", bufusage);
20842084
pfree(bufusage);
20852085

20862086
/* remove trailing newline */

0 commit comments

Comments
 (0)