Repository navigation
In review
Labels
Milestone
Description
Background
EQL (Encrypt Query Language) is the SQL library CipherStash installs into a PostgreSQL database. It stores encrypted values and lets the database query them. Its reference docs are in packages/eql/docs/reference. Version 4 of EQL installs the eql_v4 schema. The Go SDK uses that schema.
Problem
Two sentences in the EQL v4 reference docs are wrong. A user who follows either one gets a result they did not expect, with no error.
json-tree.md, lines 91 to 96, says a GIN index withjsonb_path_ops"serves both operators". The two operators are@>and<@.- PostgreSQL's
jsonb_path_opsoperator class supports@>only. - A test in docs(golang): give the index statement for each EQL query #1931 built the index on 20,000 rows in PostgreSQL 17, with the EQL v4 bundle from the Go SDK's rc.7 release.
EXPLAIN ANALYZEshowed the index in use for@>, and not for<@. - So a
<@query scans every row, and the user is not told. - The EQL v3 page
database-indexes.md, line 237, already saysjsonb_path_opsindexes@>only.
- PostgreSQL's
eql-functions.md, line 169, says an ORE column needs theeql_v4_internal.ore_block_256btree operator class.docs/upgrading/v3.1.md, line 51, says the v4 bundle renamedore_block_256toore_block_v2.- The v4 bundle installs
ore_block_v2_operator_class. This was seen in the same test. - So a user who checks
pg_opclassfor the name in the docs does not find it, even on an install that has the class.
Nothing catches either error, because no test reads the prose of the reference docs.
Proposal
- In
json-tree.md, say the GIN index serves@>only. Say what a<@query does without it: it reads every row. Add any index that serves<@, if one exists, after testing it. - In
eql-functions.md, name the v4 operator classore_block_v2_operator_class, in theeql_v4_internalschema. Check the rest of that page, and the othereql_v4pages, for the old name. - Check each corrected statement against the v4 SQL in
packages/eql/src, and say where.
Evidence
- Verified: both sentences, and
v3.1.mdline 51, read onnexton 2026-11-27. - Verified in docs(golang): give the index statement for each EQL query #1931: the
EXPLAIN ANALYZEresults, and the operator class name the v4 bundle installs. - Found while writing the index guide for the Go SDK README in docs(golang): give the index statement for each EQL query #1931.
Activity
docs(eql): type the containment operands and scope the operator class…