Commit 79515413 authored by Steven Oliver's avatar Steven Oliver Committed by Luca Bruno

libpq: Add PQping enum and functions

Fixes bug 722878
parent cd2f686a
......@@ -17,7 +17,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Author:
* Jukka-Pekka Iivonen <jp0409@jippii.fi>
* Jukka-Pekka Iivonen <jp0409@jippii.fi>
*/
#if LIBPQ_9_3
......@@ -93,6 +93,14 @@ namespace Postgres {
SOURCE_FUNCTION
}
[CCode (cname = "PGPing", cprefix = "PQPING_", has_type_id = false)]
public enum Ping {
OK,
REJECT,
NO_RESPONCE,
NO_ATTEMPT
}
[Compact]
[CCode (cname = "PGnotify", free_function = "PQfreemem")]
public class Notify {
......@@ -124,7 +132,7 @@ namespace Postgres {
}
[Compact]
[CCode (free_function = "PQconninfoFree", cname = "PQconninfoOption")]
[CCode (cname = "PQconninfoOption", free_function = "PQconninfoFree")]
public class ConnectionOptions {
public string keyword;
public string envvar;
......@@ -328,6 +336,12 @@ namespace Postgres {
[CCode (cname = "PQisnonblocking")]
public int is_non_blocking ();
[CCode (cname = "PQping"]
public Ping ping();
[CCode (cname = "PQpingParams")]
public Ping ping_params(string keywords, string values, int expand_dbname);
[CCode (cname = "PQflush")]
public int flush ();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment