---------------- * ReadCommand reads a command from either the frontend or * standard input, places it in inBuf, and returns the * message type code (first byte of the message). * EOF is returned if end of file. * ---------------- */
| 605 | * ---------------- |
| 606 | */ |
| 607 | static int |
| 608 | ReadCommand(StringInfo inBuf) |
| 609 | { |
| 610 | int result; |
| 611 | |
| 612 | /* |
| 613 | * XXX Use of this fault is discouraged! This fault location is reached |
| 614 | * in query executing backends as well as many non-query executing |
| 615 | * processes such as FTS probe handler, walsender, etc. It is also found |
| 616 | * to be triggered by the same SQL statement used to inject the fault, |
| 617 | * causing difficult to analyse failures in CI. If a test intends to |
| 618 | * target a query executing backend process, consider using |
| 619 | * "exec_simple_query_start" fault. |
| 620 | */ |
| 621 | SIMPLE_FAULT_INJECTOR("before_read_command"); |
| 622 | |
| 623 | if (whereToSendOutput == DestRemote) |
| 624 | result = SocketBackend(inBuf); |
| 625 | else |
| 626 | result = InteractiveBackend(inBuf); |
| 627 | return result; |
| 628 | } |
| 629 | |
| 630 | /* |
| 631 | * ProcessClientReadInterrupt() - Process interrupts specific to client reads |
no test coverage detected