diff options
author | Daniel Golle <daniel@makrotopia.org> | 2016-10-18 11:28:23 +0000 |
---|---|---|
committer | Daniel Golle <daniel@makrotopia.org> | 2016-10-18 11:28:23 +0000 |
commit | b709fa7937e671b1a5f6e941c9a2ea7c342e23f2 (patch) | |
tree | db8431c45846409e40ac5532bc62669c4f822a2f /src/psycstore | |
parent | 562504f9c0e8571fefd6c3dd2c398e6ccffa0027 (diff) | |
download | gnunet-b709fa7937e671b1a5f6e941c9a2ea7c342e23f2.tar.gz gnunet-b709fa7937e671b1a5f6e941c9a2ea7c342e23f2.zip |
psycstore: postgres: add LENGTH checks for signature and purpose
Diffstat (limited to 'src/psycstore')
-rw-r--r-- | src/psycstore/plugin_psycstore_postgres.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/psycstore/plugin_psycstore_postgres.c b/src/psycstore/plugin_psycstore_postgres.c index c6d274a78..273ab4e80 100644 --- a/src/psycstore/plugin_psycstore_postgres.c +++ b/src/psycstore/plugin_psycstore_postgres.c | |||
@@ -158,8 +158,8 @@ database_setup (struct Plugin *plugin) | |||
158 | "CREATE TABLE IF NOT EXISTS messages (\n" | 158 | "CREATE TABLE IF NOT EXISTS messages (\n" |
159 | " channel_id BIGINT NOT NULL REFERENCES channels(id),\n" | 159 | " channel_id BIGINT NOT NULL REFERENCES channels(id),\n" |
160 | " hop_counter INT NOT NULL,\n" | 160 | " hop_counter INT NOT NULL,\n" |
161 | " signature BYTEA,\n" | 161 | " signature BYTEA CHECK (LENGTH(signature)=64),\n" |
162 | " purpose BYTEA,\n" | 162 | " purpose BYTEA CHECK (LENGTH(purpose)=8),\n" |
163 | " fragment_id BIGINT NOT NULL,\n" | 163 | " fragment_id BIGINT NOT NULL,\n" |
164 | " fragment_offset BIGINT NOT NULL,\n" | 164 | " fragment_offset BIGINT NOT NULL,\n" |
165 | " message_id BIGINT NOT NULL,\n" | 165 | " message_id BIGINT NOT NULL,\n" |