PQsendQuery
Description
Commits a command to the server without waiting for the result. If the query is successful, 1 is returned. Otherwise, 0 is returned.
Prototype
int PQsendQuery(PGconn* conn, const char* query);
Parameter
Keyword |
Description |
---|---|
conn |
Points to the object pointer that contains the connection information. |
query |
Query string to be executed. |
Return Value
int indicates the execution result. 1 indicates successful execution and 0 indicates an execution failure. The failure cause is stored in conn->errorMessage.
Precautions
After PQsendQuery is successfully called, call PQgetResult one or more times to obtain the results. PQsendQuery cannot be called again (on the same connection) until PQgetResult returns a null pointer, indicating that the command execution is complete.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot