mirror of
https://github.com/postgres/postgres.git
synced 2025-06-27 23:21:58 +03:00
Remove dead code and fix comments in fast-path function handling.
HandleFunctionRequest() is no longer responsible for reading the protocol message from the client, since commit2b3a8b20c2
. Fix the outdated comments. HandleFunctionRequest() now always returns 0, because the code that used to return EOF was moved in2b3a8b20c2
. Therefore, the caller no longer needs to check the return value. Reported by Andres Freund. Backpatch to all supported versions, even though this doesn't have any user-visible effect, to make backporting future patches in this area easier. Discussion: https://www.postgresql.org/message-id/20170405010525.rt5azbya5fkbhvrx@alap3.anarazel.de
This commit is contained in:
@ -4165,19 +4165,7 @@ PostgresMain(int argc, char *argv[],
|
||||
/* switch back to message context */
|
||||
MemoryContextSwitchTo(MessageContext);
|
||||
|
||||
if (HandleFunctionRequest(&input_message) == EOF)
|
||||
{
|
||||
/* lost frontend connection during F message input */
|
||||
|
||||
/*
|
||||
* Reset whereToSendOutput to prevent ereport from
|
||||
* attempting to send any more messages to client.
|
||||
*/
|
||||
if (whereToSendOutput == DestRemote)
|
||||
whereToSendOutput = DestNone;
|
||||
|
||||
proc_exit(0);
|
||||
}
|
||||
HandleFunctionRequest(&input_message);
|
||||
|
||||
/* commit the function-invocation transaction */
|
||||
finish_xact_command();
|
||||
|
Reference in New Issue
Block a user