Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfde5c03

Browse files
committed
Improve comments about ProcessUtility's queryString parameter.
Per discussion with Craig Ringer.
1 parentfefb86b commitfde5c03

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

‎src/backend/tcop/utility.c

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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, callerMUST 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+
*CallerMUST 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
*/
322331
void
323332
ProcessUtility(PlannedStmt*pstmt,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp