* If query_buf is empty, copy previous_buf into it. * * This is used by various slash commands for which re-execution of a * previous query is a common usage. For convenience, we allow the * case of query_buf == NULL (and do nothing). * * Returns "true" if the previous query was copied into the query * buffer, else "false". */
| 3033 | * buffer, else "false". |
| 3034 | */ |
| 3035 | static bool |
| 3036 | copy_previous_query(PQExpBuffer query_buf, PQExpBuffer previous_buf) |
| 3037 | { |
| 3038 | if (query_buf && query_buf->len == 0) |
| 3039 | { |
| 3040 | appendPQExpBufferStr(query_buf, previous_buf->data); |
| 3041 | return true; |
| 3042 | } |
| 3043 | return false; |
| 3044 | } |
| 3045 | |
| 3046 | /* |
| 3047 | * Ask the user for a password; 'username' is the username the |
no test coverage detected