[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r38168 - gnunet/src/psycstore
From: |
gnunet |
Subject: |
[GNUnet-SVN] r38168 - gnunet/src/psycstore |
Date: |
Tue, 18 Oct 2016 12:36:46 +0200 |
Author: daniel
Date: 2016-10-18 12:36:46 +0200 (Tue, 18 Oct 2016)
New Revision: 38168
Modified:
gnunet/src/psycstore/plugin_psycstore_postgres.c
Log:
psycstore: postgres: introduce LENGTH check for pub_key field
Modified: gnunet/src/psycstore/plugin_psycstore_postgres.c
===================================================================
--- gnunet/src/psycstore/plugin_psycstore_postgres.c 2016-10-17 18:14:32 UTC
(rev 38167)
+++ gnunet/src/psycstore/plugin_psycstore_postgres.c 2016-10-18 10:36:46 UTC
(rev 38168)
@@ -100,7 +100,7 @@
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 @@
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")) ||
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r38168 - gnunet/src/psycstore,
gnunet <=