50 "Preparing SQL: %s\n",
57 if (PGRES_COMMAND_OK != PQresultStatus (
ret))
61 "PQprepare (`%s') failed with error: %s\n",
63 PQerrorMessage (pg->
conn));
76 for (
unsigned int i = 0;
84 "Preparing SQL statement `%s' as `%s'\n",
87 ret = PQprepare (
db->conn,
92 if (PGRES_COMMAND_OK != PQresultStatus (
ret))
96 "PQprepare (`%s' as `%s') failed with error: %s\n",
99 PQerrorMessage (
db->conn));
101 ret = PQdescribePrepared (
db->conn,
103 if (PGRES_COMMAND_OK != PQresultStatus (
ret))
110 "Statement `%s' already known. Ignoring the issue in the hope that you are using connection pooling...\n",
static int ret
Final status code.
static struct GNUNET_PEERSTORE_Handle * ps
Handle to the PEERSTORE service.
static char * name
Name (label) of the records to list.
static struct GNUNET_FS_DirectoryBuilder * db
#define GNUNET_log_from(kind, comp,...)
GNUNET_GenericReturnValue
Named constants for return values.
@ GNUNET_ERROR_TYPE_WARNING
@ GNUNET_ERROR_TYPE_ERROR
shared internal data structures of libgnunetpq
enum GNUNET_GenericReturnValue GNUNET_PQ_prepare_anon(struct GNUNET_PQ_Context *pg, const char *sql)
Prepares SQL statement sql under no name ("") for connection pg.
enum GNUNET_GenericReturnValue GNUNET_PQ_prepare_statements(struct GNUNET_PQ_Context *db, const struct GNUNET_PQ_PreparedStatement *ps)
Request creation of prepared statements ps from Postgres.
struct GNUNET_PQ_PreparedStatement GNUNET_PQ_make_prepare(const char *name, const char *sql)
Create a struct GNUNET_PQ_PreparedStatement.
Handle to Postgres database.
PGconn * conn
Actual connection.
Information needed to prepare a list of SQL statements using GNUNET_PQ_prepare_statements().
const char * sql
Actual SQL statement.