projects
/
oweals
/
gnunet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b3edc37
)
psycstore: postgres: introduce LENGTH check for pub_key field
author
Daniel Golle
<daniel@makrotopia.org>
Tue, 18 Oct 2016 10:36:46 +0000
(10:36 +0000)
committer
Daniel Golle
<daniel@makrotopia.org>
Tue, 18 Oct 2016 10:36:46 +0000
(10:36 +0000)
src/psycstore/plugin_psycstore_postgres.c
patch
|
blob
|
history
diff --git
a/src/psycstore/plugin_psycstore_postgres.c
b/src/psycstore/plugin_psycstore_postgres.c
index 9240d33348a9504bb3be20f133b3c96eac595fae..c6d274a78cc41998458213da1d832f6f066c037a 100644
(file)
--- a/
src/psycstore/plugin_psycstore_postgres.c
+++ b/
src/psycstore/plugin_psycstore_postgres.c
@@
-100,7
+100,7
@@
database_setup (struct Plugin *plugin)
GNUNET_POSTGRES_exec(plugin->dbh,
"CREATE TABLE IF NOT EXISTS channels (\n"
" id SERIAL,\n"
- " pub_key BYTEA,\n"
+ " pub_key BYTEA
NOT NULL CHECK (LENGTH(pub_key)=32)
,\n"
" max_state_message_id BIGINT,\n"
" state_hash_message_id BIGINT,\n"
" PRIMARY KEY(id)\n"
@@
-121,7
+121,7
@@
database_setup (struct Plugin *plugin)
GNUNET_POSTGRES_exec(plugin->dbh,
"CREATE TABLE IF NOT EXISTS slaves (\n"
" id SERIAL,\n"
- " pub_key BYTEA,\n"
+ " pub_key BYTEA
NOT NULL CHECK (LENGTH(pub_key)=32)
,\n"
" PRIMARY KEY(id)\n"
")" "WITH OIDS")) ||