aboutsummaryrefslogtreecommitdiff
path: root/src/namecache
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2020-09-27 19:55:09 +0100
committerDaniel Golle <daniel@makrotopia.org>2020-10-05 15:39:05 +0100
commitdaa0f22b63c1442ad51122e5ba140c1ae5890267 (patch)
treef732b1eb5f78482ff0a7a367a6bce2eff9608437 /src/namecache
parent400f527fbd5cb6d9523374f6f8d1320339c5b71a (diff)
downloadgnunet-daa0f22b63c1442ad51122e5ba140c1ae5890267.tar.gz
gnunet-daa0f22b63c1442ad51122e5ba140c1ae5890267.zip
postgres: drop use of 'WITH OIDS'
PostgreSQL since version 12 no longer supports 'WITH OIDS': Previously, a normally-invisible oid column could be specified during table creation using WITH OIDS; that ability has been removed. Columns can still be explicitly declared as type oid. Operations on tables that have columns created using WITH OIDS will need adjustment. The system catalogs that previously had hidden oid columns now have ordinary oid columns. Hence, SELECT * will now output those columns, whereas previously they would be displayed only if selected explicitly. Drop 'WITH OIDS' as it was stated even on tables for plugins which didn't make any use of the then exposed 'oid' column. In the case of datacache and datastore the 'oid' column is used, so replace the 'WITH OIDS' statement with an explicit 'oid' column having 'OID' type and a corresponding sequence. No measures are taken to still work with PostgreSQL before version 12. Users should update PostgreSQL to version 12 or newer. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'src/namecache')
-rw-r--r--src/namecache/plugin_namecache_postgres.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/namecache/plugin_namecache_postgres.c b/src/namecache/plugin_namecache_postgres.c
index 0e947e9c5..654a3ae81 100644
--- a/src/namecache/plugin_namecache_postgres.c
+++ b/src/namecache/plugin_namecache_postgres.c
@@ -64,15 +64,13 @@ database_setup (struct Plugin *plugin)
64 " query BYTEA NOT NULL DEFAULT ''," 64 " query BYTEA NOT NULL DEFAULT '',"
65 " block BYTEA NOT NULL DEFAULT ''," 65 " block BYTEA NOT NULL DEFAULT '',"
66 " expiration_time BIGINT NOT NULL DEFAULT 0" 66 " expiration_time BIGINT NOT NULL DEFAULT 0"
67 ")" 67 ")");
68 "WITH OIDS");
69 struct GNUNET_PQ_ExecuteStatement es_default = 68 struct GNUNET_PQ_ExecuteStatement es_default =
70 GNUNET_PQ_make_execute ("CREATE TABLE IF NOT EXISTS ns096blocks (" 69 GNUNET_PQ_make_execute ("CREATE TABLE IF NOT EXISTS ns096blocks ("
71 " query BYTEA NOT NULL DEFAULT ''," 70 " query BYTEA NOT NULL DEFAULT '',"
72 " block BYTEA NOT NULL DEFAULT ''," 71 " block BYTEA NOT NULL DEFAULT '',"
73 " expiration_time BIGINT NOT NULL DEFAULT 0" 72 " expiration_time BIGINT NOT NULL DEFAULT 0"
74 ")" 73 ")");
75 "WITH OIDS");
76 const struct GNUNET_PQ_ExecuteStatement *cr; 74 const struct GNUNET_PQ_ExecuteStatement *cr;
77 75
78 if (GNUNET_YES == 76 if (GNUNET_YES ==