gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet] branch master updated (54638eb12 -> cfa61f12e)


From: gnunet
Subject: [gnunet] branch master updated (54638eb12 -> cfa61f12e)
Date: Sun, 05 Feb 2023 21:00:10 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a change to branch master
in repository gnunet.

    from 54638eb12 Merge branch 'master' of ssh://git.gnunet.org/gnunet
     new 0cfa9293a PQ: remove duplicated comments, and send stderr from psql to 
/dev/null
     new cfa61f12e PG: do not return NOTIFY prefix in 
GNUNET_PG_get_event_notify_channel, commands may notify or listen or unlisten 
with the result

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/pq/pq_connect.c |  2 +-
 src/pq/pq_eval.c    | 59 -----------------------------------------------------
 src/pq/pq_event.c   |  2 +-
 src/pq/pq_exec.c    | 13 ------------
 4 files changed, 2 insertions(+), 74 deletions(-)

diff --git a/src/pq/pq_connect.c b/src/pq/pq_connect.c
index e8617a5c9..02af17c8c 100644
--- a/src/pq/pq_connect.c
+++ b/src/pq/pq_connect.c
@@ -166,7 +166,7 @@ GNUNET_PQ_exec_sql (struct GNUNET_PQ_Context *db,
               "Applying SQL file `%s' on database %s\n",
               fn,
               db->config_str);
-  psql = GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_ERR,
+  psql = GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_NONE,
                                   NULL,
                                   NULL,
                                   NULL,
diff --git a/src/pq/pq_eval.c b/src/pq/pq_eval.c
index cc16c7864..e31475e13 100644
--- a/src/pq/pq_eval.c
+++ b/src/pq/pq_eval.c
@@ -42,19 +42,6 @@
 #define PQ_DIAG_SQLSTATE_SERIALIZATION_FAILURE "40001"
 
 
-/**
- * Check the @a result's error code to see what happened.
- * Also logs errors.
- *
- * @param db database to execute the statement with
- * @param statement_name name of the statement that created @a result
- * @param result result to check
- * @return status code from the result, mapping PQ status
- *         codes to `enum GNUNET_DB_QueryStatus`.  Never
- *         returns positive values as this function does
- *         not look at the result set.
- * @deprecated (low level, let's see if we can do with just the high-level 
functions)
- */
 enum GNUNET_DB_QueryStatus
 GNUNET_PQ_eval_result (struct GNUNET_PQ_Context *db,
                        const char *statement_name,
@@ -144,22 +131,6 @@ GNUNET_PQ_eval_result (struct GNUNET_PQ_Context *db,
 }
 
 
-/**
- * Execute a named prepared @a statement that is NOT a SELECT
- * statement in @a connection using the given @a params.  Returns the
- * resulting session state.
- *
- * @param db database to execute the statement with
- * @param statement_name name of the statement
- * @param params parameters to give to the statement 
(#GNUNET_PQ_query_param_end-terminated)
- * @return status code from the result, mapping PQ status
- *         codes to `enum GNUNET_DB_QueryStatus`.  If the
- *         statement was a DELETE or UPDATE statement, the
- *         number of affected rows is returned.; if the
- *         statement was an INSERT statement, and no row
- *         was added due to a UNIQUE violation, we return
- *         zero; if INSERT was successful, we return one.
- */
 enum GNUNET_DB_QueryStatus
 GNUNET_PQ_eval_prepared_non_select (struct GNUNET_PQ_Context *db,
                                     const char *statement_name,
@@ -190,21 +161,6 @@ GNUNET_PQ_eval_prepared_non_select (struct 
GNUNET_PQ_Context *db,
 }
 
 
-/**
- * Execute a named prepared @a statement that is a SELECT statement
- * which may return multiple results in @a connection using the given
- * @a params.  Call @a rh with the results.  Returns the query
- * status including the number of results given to @a rh (possibly zero).
- * @a rh will not have been called if the return value is negative.
- *
- * @param db database to execute the statement with
- * @param statement_name name of the statement
- * @param params parameters to give to the statement 
(#GNUNET_PQ_query_param_end-terminated)
- * @param rh function to call with the result set, NULL to ignore
- * @param rh_cls closure to pass to @a rh
- * @return status code from the result, mapping PQ status
- *         codes to `enum GNUNET_DB_QueryStatus`.
- */
 enum GNUNET_DB_QueryStatus
 GNUNET_PQ_eval_prepared_multi_select (struct GNUNET_PQ_Context *db,
                                       const char *statement_name,
@@ -239,21 +195,6 @@ GNUNET_PQ_eval_prepared_multi_select (struct 
GNUNET_PQ_Context *db,
 }
 
 
-/**
- * Execute a named prepared @a statement that is a SELECT statement
- * which must return a single result in @a connection using the given
- * @a params.  Stores the result (if any) in @a rs, which the caller
- * must then clean up using #GNUNET_PQ_cleanup_result() if the return
- * value was #GNUNET_DB_STATUS_SUCCESS_ONE_RESULT.  Returns the
- * resulting session status.
- *
- * @param db database to execute the statement with
- * @param statement_name name of the statement
- * @param params parameters to give to the statement 
(#GNUNET_PQ_query_param_end-terminated)
- * @param[in,out] rs result specification to use for storing the result of the 
query
- * @return status code from the result, mapping PQ status
- *         codes to `enum GNUNET_DB_QueryStatus`.
- */
 enum GNUNET_DB_QueryStatus
 GNUNET_PQ_eval_prepared_singleton_select (
   struct GNUNET_PQ_Context *db,
diff --git a/src/pq/pq_event.c b/src/pq/pq_event.c
index 6dbacf7ff..3e708fc04 100644
--- a/src/pq/pq_event.c
+++ b/src/pq/pq_event.c
@@ -525,7 +525,7 @@ GNUNET_PG_get_event_notify_channel (const struct 
GNUNET_DB_EventHeaderP *es)
   char *end;
 
   end = stpcpy (sql,
-                "NOTIFY X");
+                "X");
   end = es_to_channel (es,
                        end);
   GNUNET_assert (NULL != end);
diff --git a/src/pq/pq_exec.c b/src/pq/pq_exec.c
index 33fe8733d..1fd8c5068 100644
--- a/src/pq/pq_exec.c
+++ b/src/pq/pq_exec.c
@@ -26,12 +26,6 @@
 #include "pq.h"
 
 
-/**
- * Create a `struct GNUNET_PQ_ExecuteStatement` where errors are fatal.
- *
- * @param sql actual SQL statement
- * @return initialized struct
- */
 struct GNUNET_PQ_ExecuteStatement
 GNUNET_PQ_make_execute (const char *sql)
 {
@@ -44,13 +38,6 @@ GNUNET_PQ_make_execute (const char *sql)
 }
 
 
-/**
- * Create a `struct GNUNET_PQ_ExecuteStatement` where errors should
- * be tolerated.
- *
- * @param sql actual SQL statement
- * @return initialized struct
- */
 struct GNUNET_PQ_ExecuteStatement
 GNUNET_PQ_make_try_execute (const char *sql)
 {

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]