@@ -311,13 +311,22 @@ CheckRestrictedOperation(const char *cmdname)
311311 * completionTag: points to a buffer of size COMPLETION_TAG_BUFSIZE
312312 * in which to store a command completion status string.
313313 *
314- * Notes: as of PG 8.4, caller MUST supply a queryString; it is not
315- * allowed anymore to pass NULL. ( If you really don't have source text,
316- * you can pass a constant string, perhaps "(query not available)".)
314+ * Caller MUST supply a queryString; it is not allowed (anymore) to pass NULL.
315+ * If you really don't have source text, you can pass a constant string ,
316+ * perhaps "(query not available)".
317317 *
318318 * completionTag is only set nonempty if we want to return a nondefault status.
319319 *
320320 * completionTag may be NULL if caller doesn't want a status string.
321+ *
322+ * Note for users of ProcessUtility_hook: the same queryString may be passed
323+ * to multiple invocations of ProcessUtility when processing a query string
324+ * containing multiple semicolon-separated statements. One should use
325+ * pstmt->stmt_location and pstmt->stmt_len to identify the substring
326+ * containing the current statement. Keep in mind also that some utility
327+ * statements (e.g., CREATE SCHEMA) will recurse to ProcessUtility to process
328+ * sub-statements, often passing down the same queryString, stmt_location,
329+ * and stmt_len that were given for the whole statement.
321330 */
322331void
323332ProcessUtility (PlannedStmt * pstmt ,
0 commit comments