diff --git a/src/github.com/matrix-org/dendrite/roomserver/storage/sql.go b/src/github.com/matrix-org/dendrite/roomserver/storage/sql.go index d90a5320d..fa8f9d3d5 100644 --- a/src/github.com/matrix-org/dendrite/roomserver/storage/sql.go +++ b/src/github.com/matrix-org/dendrite/roomserver/storage/sql.go @@ -369,7 +369,10 @@ CREATE TABLE IF NOT EXISTS event_json ( event_nid bigint NOT NULL PRIMARY KEY, -- The JSON for the event. -- Stored as TEXT because this should be valid UTF-8. - -- Not stored as a JSONB because we always just pull the entire event. + -- Not stored as a JSONB because we always just pull the entire event + -- so there is no point in postgres parsing it. + -- Not stored as JSON because we already validate the JSON in the server + -- so there is no point in postgres validating it. -- TODO: Should we be compressing the events with Snappy or DEFLATE? event_json text NOT NULL );