gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r38150 - gnunet/src/datacache


From: gnunet
Subject: [GNUnet-SVN] r38150 - gnunet/src/datacache
Date: Thu, 13 Oct 2016 02:29:43 +0200

Author: daniel
Date: 2016-10-13 02:29:43 +0200 (Thu, 13 Oct 2016)
New Revision: 38150

Modified:
   gnunet/src/datacache/plugin_datacache_postgres.c
Log:
datacache: postgres: use IF NOT EXISTS to avoid error messages

Modified: gnunet/src/datacache/plugin_datacache_postgres.c
===================================================================
--- gnunet/src/datacache/plugin_datacache_postgres.c    2016-10-13 00:29:39 UTC 
(rev 38149)
+++ gnunet/src/datacache/plugin_datacache_postgres.c    2016-10-13 00:29:43 UTC 
(rev 38150)
@@ -74,7 +74,7 @@
     return GNUNET_SYSERR;
   ret =
       PQexec (plugin->dbh,
-              "CREATE TEMPORARY TABLE gn090dc ("
+              "CREATE TEMPORARY TABLE IF NOT EXISTS gn090dc ("
               "  type INTEGER NOT NULL DEFAULT 0,"
               "  discard_time BIGINT NOT NULL DEFAULT 0,"
               "  key BYTEA NOT NULL DEFAULT '',"
@@ -100,10 +100,10 @@
   {
     if ((GNUNET_OK !=
          GNUNET_POSTGRES_exec (plugin->dbh,
-                               "CREATE INDEX idx_key ON gn090dc (key)")) ||
+                               "CREATE INDEX IF NOT EXISTS idx_key ON gn090dc 
(key)")) ||
         (GNUNET_OK !=
          GNUNET_POSTGRES_exec (plugin->dbh,
-                               "CREATE INDEX idx_dt ON gn090dc 
(discard_time)")))
+                               "CREATE INDEX IF NOT EXISTS idx_dt ON gn090dc 
(discard_time)")))
     {
       PQclear (ret);
       PQfinish (plugin->dbh);




reply via email to

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