diff options
Diffstat (limited to 'src/datastore/plugin_datastore_postgres.c')
-rw-r--r-- | src/datastore/plugin_datastore_postgres.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/datastore/plugin_datastore_postgres.c b/src/datastore/plugin_datastore_postgres.c index 7b04cc68a..8b8737935 100644 --- a/src/datastore/plugin_datastore_postgres.c +++ b/src/datastore/plugin_datastore_postgres.c | |||
@@ -114,13 +114,17 @@ init_connection (struct Plugin *plugin) | |||
114 | if (PQresultStatus (ret) == PGRES_COMMAND_OK) | 114 | if (PQresultStatus (ret) == PGRES_COMMAND_OK) |
115 | { | 115 | { |
116 | if ((GNUNET_OK != | 116 | if ((GNUNET_OK != |
117 | GNUNET_POSTGRES_exec (plugin->dbh, "CREATE INDEX IF NOT EXISTS idx_hash ON gn090 (hash)")) || | 117 | GNUNET_POSTGRES_exec (plugin->dbh, |
118 | "CREATE INDEX IF NOT EXISTS idx_hash ON gn090 (hash)")) || | ||
118 | (GNUNET_OK != | 119 | (GNUNET_OK != |
119 | GNUNET_POSTGRES_exec (plugin->dbh, "CREATE INDEX IF NOT EXISTS idx_hash_vhash ON gn090 (hash,vhash)")) || | 120 | GNUNET_POSTGRES_exec (plugin->dbh, |
121 | "CREATE INDEX IF NOT EXISTS idx_hash_vhash ON gn090 (hash,vhash)")) || | ||
120 | (GNUNET_OK != | 122 | (GNUNET_OK != |
121 | GNUNET_POSTGRES_exec (plugin->dbh, "CREATE INDEX IF NOT EXISTS idx_prio ON gn090 (prio)")) || | 123 | GNUNET_POSTGRES_exec (plugin->dbh, |
124 | "CREATE INDEX IF NOT EXISTS idx_prio ON gn090 (prio)")) || | ||
122 | (GNUNET_OK != | 125 | (GNUNET_OK != |
123 | GNUNET_POSTGRES_exec (plugin->dbh, "CREATE INDEX IF NOT EXISTS idx_expire ON gn090 (expire)")) || | 126 | GNUNET_POSTGRES_exec (plugin->dbh, |
127 | "CREATE INDEX IF NOT EXISTS idx_expire ON gn090 (expire)")) || | ||
124 | (GNUNET_OK != | 128 | (GNUNET_OK != |
125 | GNUNET_POSTGRES_exec (plugin->dbh, | 129 | GNUNET_POSTGRES_exec (plugin->dbh, |
126 | "CREATE INDEX IF NOT EXISTS idx_prio_anon ON gn090 (prio,anonLevel)")) || | 130 | "CREATE INDEX IF NOT EXISTS idx_prio_anon ON gn090 (prio,anonLevel)")) || |
@@ -128,9 +132,11 @@ init_connection (struct Plugin *plugin) | |||
128 | GNUNET_POSTGRES_exec (plugin->dbh, | 132 | GNUNET_POSTGRES_exec (plugin->dbh, |
129 | "CREATE INDEX IF NOT EXISTS idx_prio_hash_anon ON gn090 (prio,hash,anonLevel)")) || | 133 | "CREATE INDEX IF NOT EXISTS idx_prio_hash_anon ON gn090 (prio,hash,anonLevel)")) || |
130 | (GNUNET_OK != | 134 | (GNUNET_OK != |
131 | GNUNET_POSTGRES_exec (plugin->dbh, "CREATE INDEX IF NOT EXISTS idx_repl_rvalue ON gn090 (repl,rvalue)")) || | 135 | GNUNET_POSTGRES_exec (plugin->dbh, |
136 | "CREATE INDEX IF NOT EXISTS idx_repl_rvalue ON gn090 (repl,rvalue)")) || | ||
132 | (GNUNET_OK != | 137 | (GNUNET_OK != |
133 | GNUNET_POSTGRES_exec (plugin->dbh, "CREATE INDEX IF NOT EXISTS idx_expire_hash ON gn090 (expire,hash)"))) | 138 | GNUNET_POSTGRES_exec (plugin->dbh, |
139 | "CREATE INDEX IF NOT EXISTS idx_expire_hash ON gn090 (expire,hash)"))) | ||
134 | { | 140 | { |
135 | PQclear (ret); | 141 | PQclear (ret); |
136 | PQfinish (plugin->dbh); | 142 | PQfinish (plugin->dbh); |