aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/datacache/plugin_datacache_postgres.c18
-rw-r--r--src/datastore/plugin_datastore_postgres.c2
2 files changed, 16 insertions, 4 deletions
diff --git a/src/datacache/plugin_datacache_postgres.c b/src/datacache/plugin_datacache_postgres.c
index 3486d76dce..0fabdb4c2c 100644
--- a/src/datacache/plugin_datacache_postgres.c
+++ b/src/datacache/plugin_datacache_postgres.c
@@ -87,7 +87,10 @@ check_result (struct Plugin *plugin, PGresult * ret, int expected_status,
/**
* Run simple SQL statement (without results).
- */
+ *
+ * @param plugin global context
+ * @param sql statement to run
+ * @param line code line for error reporting */
static int
pq_exec (struct Plugin *plugin, const char *sql, int line)
{
@@ -104,6 +107,13 @@ pq_exec (struct Plugin *plugin, const char *sql, int line)
/**
* Prepare SQL statement.
+ *
+ * @param plugin global context
+ * @param name name for the prepared SQL statement
+ * @param sql SQL code to prepare
+ * @param nparams number of parameters in sql
+ * @param line code line for error reporting
+ * @return GNUNET_OK on success
*/
static int
pq_prepare (struct Plugin *plugin, const char *name, const char *sql,
@@ -122,6 +132,8 @@ pq_prepare (struct Plugin *plugin, const char *name, const char *sql,
/**
* @brief Get a database handle
+ *
+ * @param plugin global context
* @return GNUNET_OK on success, GNUNET_SYSERR on error
*/
static int
@@ -185,7 +197,6 @@ init_connection (struct Plugin *plugin)
}
}
PQclear (ret);
-#if 1
ret =
PQexec (plugin->dbh,
"ALTER TABLE gn090dc ALTER value SET STORAGE EXTERNAL");
@@ -208,7 +219,6 @@ init_connection (struct Plugin *plugin)
return GNUNET_SYSERR;
}
PQclear (ret);
-#endif
if ((GNUNET_OK !=
pq_prepare (plugin, "getkt",
"SELECT discard_time,type,value FROM gn090dc "
@@ -241,6 +251,8 @@ init_connection (struct Plugin *plugin)
* Delete the row identified by the given rowid (qid
* in postgres).
*
+ * @param plugin global context
+ * @param rowid which row to delete
* @return GNUNET_OK on success
*/
static int
diff --git a/src/datastore/plugin_datastore_postgres.c b/src/datastore/plugin_datastore_postgres.c
index 16393c23c2..31ba09a871 100644
--- a/src/datastore/plugin_datastore_postgres.c
+++ b/src/datastore/plugin_datastore_postgres.c
@@ -339,7 +339,7 @@ init_connection (struct Plugin *plugin)
* @return GNUNET_OK on success
*/
static int
-delete_by_rowid (struct Plugin *plugin, unsigned int rowid)
+delete_by_rowid (struct Plugin *plugin, uint32_t rowid)
{
uint32_t browid;
const char *paramValues[] = { (const char *) &browid };