diff options
author | t3sserakt <t3ss@posteo.de> | 2020-10-06 07:20:48 +0200 |
---|---|---|
committer | t3sserakt <t3ss@posteo.de> | 2020-10-06 07:22:03 +0200 |
commit | c25c3fd24b691d35674b1e67cbcf1066c427c7d3 (patch) | |
tree | 78fc68ab20c10db73c3e111898c0f4034edce832 /src/datacache/plugin_datacache_postgres.c | |
parent | 8c40115c58f639edc17ff242ec1a79c2078dc301 (diff) | |
parent | daa0f22b63c1442ad51122e5ba140c1ae5890267 (diff) | |
download | gnunet-c25c3fd24b691d35674b1e67cbcf1066c427c7d3.tar.gz gnunet-c25c3fd24b691d35674b1e67cbcf1066c427c7d3.zip |
Merge branch 'master' of ssh://gnunet.org/gnunet
Diffstat (limited to 'src/datacache/plugin_datacache_postgres.c')
-rw-r--r-- | src/datacache/plugin_datacache_postgres.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/datacache/plugin_datacache_postgres.c b/src/datacache/plugin_datacache_postgres.c index c21be9219..724324ca4 100644 --- a/src/datacache/plugin_datacache_postgres.c +++ b/src/datacache/plugin_datacache_postgres.c | |||
@@ -67,14 +67,19 @@ static int | |||
67 | init_connection (struct Plugin *plugin) | 67 | init_connection (struct Plugin *plugin) |
68 | { | 68 | { |
69 | struct GNUNET_PQ_ExecuteStatement es[] = { | 69 | struct GNUNET_PQ_ExecuteStatement es[] = { |
70 | GNUNET_PQ_make_try_execute ("CREATE TEMPORARY SEQUENCE IF NOT EXISTS gn011dc_oid_seq"), | ||
70 | GNUNET_PQ_make_execute ("CREATE TEMPORARY TABLE IF NOT EXISTS gn011dc (" | 71 | GNUNET_PQ_make_execute ("CREATE TEMPORARY TABLE IF NOT EXISTS gn011dc (" |
72 | " oid OID NOT NULL DEFAULT nextval('gn011dc_oid_seq')," | ||
71 | " type INTEGER NOT NULL," | 73 | " type INTEGER NOT NULL," |
72 | " prox INTEGER NOT NULL," | 74 | " prox INTEGER NOT NULL," |
73 | " discard_time BIGINT NOT NULL," | 75 | " discard_time BIGINT NOT NULL," |
74 | " key BYTEA NOT NULL," | 76 | " key BYTEA NOT NULL," |
75 | " value BYTEA NOT NULL," | 77 | " value BYTEA NOT NULL," |
76 | " path BYTEA DEFAULT NULL)" | 78 | " path BYTEA DEFAULT NULL)"), |
77 | "WITH OIDS"), | 79 | GNUNET_PQ_make_try_execute ( |
80 | "ALTER SEQUENCE gnu011dc_oid_seq OWNED BY gn011dc.oid"), | ||
81 | GNUNET_PQ_make_try_execute ( | ||
82 | "CREATE INDEX IF NOT EXISTS idx_oid ON gn011dc (oid)"), | ||
78 | GNUNET_PQ_make_try_execute ( | 83 | GNUNET_PQ_make_try_execute ( |
79 | "CREATE INDEX IF NOT EXISTS idx_key ON gn011dc (key)"), | 84 | "CREATE INDEX IF NOT EXISTS idx_key ON gn011dc (key)"), |
80 | GNUNET_PQ_make_try_execute ( | 85 | GNUNET_PQ_make_try_execute ( |