There once was a rumour of a EXPLAIN EXECUTE command.

This minor patch removes all trace of that, but without disturbing other
valid occurrences of the EXECUTE command, which still lives on.

Best Regards, Simon Riggs
Index: commands/explain.c
===================================================================
RCS file: /projects/cvsroot/pgsql/src/backend/commands/explain.c,v
retrieving revision 1.137
diff -c -c -r1.137 explain.c
*** commands/explain.c	4 Jun 2005 02:07:09 -0000	1.137
--- commands/explain.c	9 Aug 2005 22:18:45 -0000
***************
*** 93,99 ****
  		if (query->utilityStmt && IsA(query->utilityStmt, DeclareCursorStmt))
  			ExplainOneQuery(query, stmt, tstate);
  		else if (query->utilityStmt && IsA(query->utilityStmt, ExecuteStmt))
! 			ExplainExecuteQuery(stmt, tstate);
  		else
  			do_text_output_oneline(tstate, "Utility statements have no plan structure");
  	}
--- 93,99 ----
  		if (query->utilityStmt && IsA(query->utilityStmt, DeclareCursorStmt))
  			ExplainOneQuery(query, stmt, tstate);
  		else if (query->utilityStmt && IsA(query->utilityStmt, ExecuteStmt))
! 			ExplainAnalyzeQuery(stmt, tstate);
  		else
  			do_text_output_oneline(tstate, "Utility statements have no plan structure");
  	}
***************
*** 211,217 ****
   *		EXPLAIN output
   *
   * This is exported because it's called back from prepare.c in the
!  * EXPLAIN EXECUTE case
   *
   * Note: the passed-in QueryDesc is freed when we're done with it
   */
--- 211,217 ----
   *		EXPLAIN output
   *
   * This is exported because it's called back from prepare.c in the
!  * EXPLAIN ANALYZE case
   *
   * Note: the passed-in QueryDesc is freed when we're done with it
   */
Index: commands/prepare.c
===================================================================
RCS file: /projects/cvsroot/pgsql/src/backend/commands/prepare.c,v
retrieving revision 1.40
diff -c -c -r1.40 prepare.c
*** commands/prepare.c	22 Jun 2005 17:45:45 -0000	1.40
--- commands/prepare.c	9 Aug 2005 22:18:46 -0000
***************
*** 535,544 ****
  }
  
  /*
!  * Implements the 'EXPLAIN EXECUTE' utility statement.
   */
  void
! ExplainExecuteQuery(ExplainStmt *stmt, TupOutputState *tstate)
  {
  	ExecuteStmt *execstmt = (ExecuteStmt *) stmt->query->utilityStmt;
  	PreparedStatement *entry;
--- 535,544 ----
  }
  
  /*
!  * Implements the 'EXPLAIN ANALYZE' utility statement.
   */
  void
! ExplainAnalyzeQuery(ExplainStmt *stmt, TupOutputState *tstate)
  {
  	ExecuteStmt *execstmt = (ExecuteStmt *) stmt->query->utilityStmt;
  	PreparedStatement *entry;
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

Reply via email to