*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.542.2.3 2008/12/13 02:00:29 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.542.2.4 2009/01/01 17:12:24 tgl Exp $
*
* NOTES
* this is the "main" module of the postgres backend and
cplan = NULL;
}
- /* Done with the snapshot used for parameter I/O and parsing/planning */
- ActiveSnapshot = NULL;
- if (mySnapshot)
- FreeSnapshot(mySnapshot);
-
/*
- * Define portal and start execution.
+ * Now we can define the portal.
+ *
+ * DO NOT put any code that could possibly throw an error between the
+ * above "RevalidateCachedPlan(psrc, false)" call and here.
*/
PortalDefineQuery(portal,
saved_stmt_name,
plan_list,
cplan);
+ /* Done with the snapshot used for parameter I/O and parsing/planning */
+ ActiveSnapshot = NULL;
+ if (mySnapshot)
+ FreeSnapshot(mySnapshot);
+
+ /*
+ * And we're ready to start portal execution.
+ */
PortalStart(portal, params, InvalidSnapshot);
/*