diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-03-09 00:15:45 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-03-09 00:15:54 +0100 |
commit | 99350928f4087a116de62350d7d3f293e50e468c (patch) | |
tree | 84f143effd684bfda4447c11fb256e7ec65d6243 /src/datastore/plugin_datastore_postgres.c | |
parent | 4bf28bcaa25b8da6c28520a1aa18275dbe5f27a4 (diff) |
we use CREATE INDEX IF NOT EXITS, this requires postgres>=9.6, bump dependency requirements
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 7b04cc68a7..8b8737935b 100644 --- a/src/datastore/plugin_datastore_postgres.c +++ b/src/datastore/plugin_datastore_postgres.c @@ -114,13 +114,17 @@ init_connection (struct Plugin *plugin) if (PQresultStatus (ret) == PGRES_COMMAND_OK) { if ((GNUNET_OK != - GNUNET_POSTGRES_exec (plugin->dbh, "CREATE INDEX IF NOT EXISTS idx_hash ON gn090 (hash)")) || + GNUNET_POSTGRES_exec (plugin->dbh, + "CREATE INDEX IF NOT EXISTS idx_hash ON gn090 (hash)")) || (GNUNET_OK != - GNUNET_POSTGRES_exec (plugin->dbh, "CREATE INDEX IF NOT EXISTS idx_hash_vhash ON gn090 (hash,vhash)")) || + GNUNET_POSTGRES_exec (plugin->dbh, + "CREATE INDEX IF NOT EXISTS idx_hash_vhash ON gn090 (hash,vhash)")) || (GNUNET_OK != - GNUNET_POSTGRES_exec (plugin->dbh, "CREATE INDEX IF NOT EXISTS idx_prio ON gn090 (prio)")) || + GNUNET_POSTGRES_exec (plugin->dbh, + "CREATE INDEX IF NOT EXISTS idx_prio ON gn090 (prio)")) || (GNUNET_OK != - GNUNET_POSTGRES_exec (plugin->dbh, "CREATE INDEX IF NOT EXISTS idx_expire ON gn090 (expire)")) || + GNUNET_POSTGRES_exec (plugin->dbh, + "CREATE INDEX IF NOT EXISTS idx_expire ON gn090 (expire)")) || (GNUNET_OK != GNUNET_POSTGRES_exec (plugin->dbh, "CREATE INDEX IF NOT EXISTS idx_prio_anon ON gn090 (prio,anonLevel)")) || @@ -128,9 +132,11 @@ init_connection (struct Plugin *plugin) GNUNET_POSTGRES_exec (plugin->dbh, "CREATE INDEX IF NOT EXISTS idx_prio_hash_anon ON gn090 (prio,hash,anonLevel)")) || (GNUNET_OK != - GNUNET_POSTGRES_exec (plugin->dbh, "CREATE INDEX IF NOT EXISTS idx_repl_rvalue ON gn090 (repl,rvalue)")) || + GNUNET_POSTGRES_exec (plugin->dbh, + "CREATE INDEX IF NOT EXISTS idx_repl_rvalue ON gn090 (repl,rvalue)")) || (GNUNET_OK != - GNUNET_POSTGRES_exec (plugin->dbh, "CREATE INDEX IF NOT EXISTS idx_expire_hash ON gn090 (expire,hash)"))) + GNUNET_POSTGRES_exec (plugin->dbh, + "CREATE INDEX IF NOT EXISTS idx_expire_hash ON gn090 (expire,hash)"))) { PQclear (ret); PQfinish (plugin->dbh); |