diff options
Diffstat (limited to 'src/datacache')
-rw-r--r-- | src/datacache/plugin_datacache_postgres.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/datacache/plugin_datacache_postgres.c b/src/datacache/plugin_datacache_postgres.c index 147bb4223..13c2c26a2 100644 --- a/src/datacache/plugin_datacache_postgres.c +++ b/src/datacache/plugin_datacache_postgres.c | |||
@@ -74,7 +74,7 @@ init_connection (struct Plugin *plugin) | |||
74 | return GNUNET_SYSERR; | 74 | return GNUNET_SYSERR; |
75 | ret = | 75 | ret = |
76 | PQexec (plugin->dbh, | 76 | PQexec (plugin->dbh, |
77 | "CREATE TEMPORARY TABLE gn090dc (" | 77 | "CREATE TEMPORARY TABLE IF NOT EXISTS gn090dc (" |
78 | " type INTEGER NOT NULL DEFAULT 0," | 78 | " type INTEGER NOT NULL DEFAULT 0," |
79 | " discard_time BIGINT NOT NULL DEFAULT 0," | 79 | " discard_time BIGINT NOT NULL DEFAULT 0," |
80 | " key BYTEA NOT NULL DEFAULT ''," | 80 | " key BYTEA NOT NULL DEFAULT ''," |
@@ -100,10 +100,10 @@ init_connection (struct Plugin *plugin) | |||
100 | { | 100 | { |
101 | if ((GNUNET_OK != | 101 | if ((GNUNET_OK != |
102 | GNUNET_POSTGRES_exec (plugin->dbh, | 102 | GNUNET_POSTGRES_exec (plugin->dbh, |
103 | "CREATE INDEX idx_key ON gn090dc (key)")) || | 103 | "CREATE INDEX IF NOT EXISTS idx_key ON gn090dc (key)")) || |
104 | (GNUNET_OK != | 104 | (GNUNET_OK != |
105 | GNUNET_POSTGRES_exec (plugin->dbh, | 105 | GNUNET_POSTGRES_exec (plugin->dbh, |
106 | "CREATE INDEX idx_dt ON gn090dc (discard_time)"))) | 106 | "CREATE INDEX IF NOT EXISTS idx_dt ON gn090dc (discard_time)"))) |
107 | { | 107 | { |
108 | PQclear (ret); | 108 | PQclear (ret); |
109 | PQfinish (plugin->dbh); | 109 | PQfinish (plugin->dbh); |