mirror of
https://github.com/postgres/postgres.git
synced 2025-08-14 02:22:38 +03:00
Editorialize a bit on new ProcessUtility() API.
Choose a saner ordering of parameters (adding a new input param after the output params seemed a bit random), update the function's header comment to match reality (cmon folks, is this really that hard?), get rid of useless and sloppily-defined distinction between PROCESS_UTILITY_SUBCOMMAND and PROCESS_UTILITY_GENERATED.
This commit is contained in:
@@ -750,10 +750,10 @@ execute_sql_string(const char *sql, const char *filename)
|
||||
{
|
||||
ProcessUtility(stmt,
|
||||
sql,
|
||||
PROCESS_UTILITY_QUERY,
|
||||
NULL,
|
||||
dest,
|
||||
NULL,
|
||||
PROCESS_UTILITY_QUERY);
|
||||
NULL);
|
||||
}
|
||||
|
||||
PopActiveSnapshot();
|
||||
|
@@ -151,10 +151,10 @@ CreateSchemaCommand(CreateSchemaStmt *stmt, const char *queryString)
|
||||
/* do this step */
|
||||
ProcessUtility(stmt,
|
||||
queryString,
|
||||
PROCESS_UTILITY_SUBCOMMAND,
|
||||
NULL,
|
||||
None_Receiver,
|
||||
NULL,
|
||||
PROCESS_UTILITY_SUBCOMMAND);
|
||||
NULL);
|
||||
/* make sure later steps can see the object created here */
|
||||
CommandCounterIncrement();
|
||||
}
|
||||
|
@@ -1014,7 +1014,8 @@ ConvertTriggerToFK(CreateTrigStmt *stmt, Oid funcoid)
|
||||
/* ... and execute it */
|
||||
ProcessUtility((Node *) atstmt,
|
||||
"(generated ALTER TABLE ADD FOREIGN KEY command)",
|
||||
NULL, None_Receiver, NULL, PROCESS_UTILITY_GENERATED);
|
||||
PROCESS_UTILITY_SUBCOMMAND, NULL,
|
||||
None_Receiver, NULL);
|
||||
|
||||
/* Remove the matched item from the list */
|
||||
info_list = list_delete_ptr(info_list, info);
|
||||
|
Reference in New Issue
Block a user