From 085d821543c90678abefeca2838afb2bdc5992e3 Mon Sep 17 00:00:00 2001 From: Dan Draper Date: Mon, 16 Nov 2026 17:57:32 +1100 Subject: [PATCH 1/2] docs(go): an rc.5 changelog section Everything under Unreleased landed after the rc.4 tag, so it moves under a dated rc.5 heading. The section records three changes that had no entry. The EQL v4 bundle built from next differs from the one attached to rc.4: it adds 1,060 function and operator pairs that refuse a comparison between two EQL types, which PostgreSQL otherwise answered as plain jsonb, returning false for equal values (#1547). Its comparison functions also name the schema of every built-in operator they call (#1551, #1667). The crypto guest wipes more plaintext copies (#1643), and the host no longer leaves data in a guest buffer when a write fails (#1550). The upgrade note follows rc.3's: install the attached bundle, then grant access again and re-create the indexes, because the bundle drops the eql_v4 schemas with CASCADE. The uninstall script is unchanged, go.mod is unchanged, and no generated file changes. --- languages/golang/CHANGELOG.md | 59 +++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/languages/golang/CHANGELOG.md b/languages/golang/CHANGELOG.md index fd3be338c..39a519848 100644 --- a/languages/golang/CHANGELOG.md +++ b/languages/golang/CHANGELOG.md @@ -10,6 +10,36 @@ listed under **Breaking**. Releases are tagged `languages/golang/vX.Y.Z`. ## [Unreleased] +## [0.1.0-rc.5] - 2026-11-16 + +### Upgrading from rc.4 + +Install the `eql-v4-install.sql` attached to this release +(`psql -f eql-v4-install.sql`). The Go code in rc.5 sends no query that +needs the new SQL. But with the rc.4 bundle, PostgreSQL gives wrong +results for some comparisons. The rc.5 bundle refuses them, as the Changed +section below describes. + +Re-running the bundle keeps your columns and data, because the column types +are in the `public` schema. The bundle drops the `eql_v4` and +`eql_v4_internal` schemas with `CASCADE`, and creates them again. That +removes every index that uses an `eql_v4` function, such as +`eql_v4.ord_term(col)`. Dropping the schemas also removes every grant on +them and their functions, and the bundle issues no `GRANT`. After the bundle +runs, and before the application sends queries: + +1. If the application connects as a role other than the one that installed + EQL, grant that role access again. The role needs `USAGE` on the + schemas `eql_v4` and `eql_v4_internal`, and `EXECUTE` on all their + functions. EQL's + [permissions reference](../../packages/eql/docs/reference/permissions.md) + lists the `GRANT` statements. The reference's examples name `eql_v3`, so + write `eql_v4`. +2. Re-create the indexes, then run `ANALYZE`. + +Your Go code needs no change. `AccessKeyCredentials` is new. You can choose +to use it. + ### Added - `encrypt.AccessKeyCredentials`: credentials from a struct your program @@ -26,6 +56,35 @@ listed under **Breaking**. Releases are tagged `languages/golang/vX.Y.Z`. of anything you print. `fmt` prints a value in an unexported field in full. +### Changed + +- **The EQL v4 bundle refuses a comparison between two different EQL + types** (#1547). Before, a column of one type compared with a query + value of another type was compared as plain `jsonb`. PostgreSQL then + returned false for equal values, with no error. Now the comparison + raises `operator … is not supported for …`. An example is a + `public.eql_v4_text_search` column compared with `@@` against an + `eql_v4.query_text_match` value. The queries the Go SDK builds name the + matching type, so they are not affected. +- **The bundle's comparison functions name the schema of each built-in + operator and function they call** (#1551, #1667). For example, the + functions write `OPERATOR(pg_catalog.@>)` and + `pg_catalog.cardinality(...)`. A `search_path` that puts another schema first can no longer + change which operator a comparison uses. `eql_v4.between` gets the same + change. +- **The embedded crypto guest wipes more copies of plaintext before it + frees them** (#1643). The copies were in the match index's lowercasing, + the decoding of JSON paths and predicates, and the opening of a sealed + JSON document. Stored values and query terms do not change. + +### Fixed + +- **A failed write into guest memory no longer leaves the data in a guest + buffer** (#1550). When the client could not record where a buffer was, + the bytes stayed in guest memory. The client now checks where it will + record the buffer before it allocates one. If a write fails after the + allocation, the client zeroes the bytes. + ## [0.1.0-rc.4] - 2026-11-13 ### Upgrading from rc.3 From 2df1aa6b65060c74c712a85b8931a19d9b576bf8 Mon Sep 17 00:00:00 2001 From: Dan Draper Date: Mon, 16 Nov 2026 20:02:54 +1100 Subject: [PATCH 2/2] docs(go): correct the rc.5 changelog from review From the review of 085d82154, each checked against the rc.4 and rc.5 bundles: - The ORE comparison functions in rc.4 called a bare `<` or `=` on eql_v4_internal.ore_block_v2, a composite type whose operators are in public. With public off the search_path, PostgreSQL resolved them to its record comparison: on an rc.4 install, `<` under `search_path = pg_catalog` compared the raw bytes and returned false, where `public` on the path reaches EQL's ORE comparison. This is a wrong-result fix, so it moves to Fixed and says when it applied. - Re-running the bundle drops more than the indexes and grants. Tested on PostgreSQL 17: a view, a restrictive row-level security policy and a CHECK constraint that use EQL were all dropped without an error, and dropping the restrictive policy left the table more visible. The notice lists only the first 100 of the 4,402 objects dropped. The upgrade steps now start with a query that lists them, tested to list exactly those objects on rc.4 and rc.5 and nothing on a fresh install. - The cross-type blockers (#1547) move to Fixed too: they turn a silent false into an error. - Two credential-guest fixes from #1553 apply without workspace pinning and are now listed: an oversized expires_in no longer makes every request refresh, and profile files are read into a wiped buffer. - The upgrade note names Secret beside AccessKeyCredentials, and one long line is re-wrapped. The section is rewritten to the plain-language rules: one idea in each sentence of 25 words or fewer, a condition before its instruction, and ORE spelled out. --- languages/golang/CHANGELOG.md | 148 ++++++++++++++++++++++++---------- 1 file changed, 106 insertions(+), 42 deletions(-) diff --git a/languages/golang/CHANGELOG.md b/languages/golang/CHANGELOG.md index 39a519848..fd041b636 100644 --- a/languages/golang/CHANGELOG.md +++ b/languages/golang/CHANGELOG.md @@ -14,31 +14,74 @@ listed under **Breaking**. Releases are tagged `languages/golang/vX.Y.Z`. ### Upgrading from rc.4 -Install the `eql-v4-install.sql` attached to this release -(`psql -f eql-v4-install.sql`). The Go code in rc.5 sends no query that -needs the new SQL. But with the rc.4 bundle, PostgreSQL gives wrong -results for some comparisons. The rc.5 bundle refuses them, as the Changed -section below describes. - -Re-running the bundle keeps your columns and data, because the column types -are in the `public` schema. The bundle drops the `eql_v4` and -`eql_v4_internal` schemas with `CASCADE`, and creates them again. That -removes every index that uses an `eql_v4` function, such as -`eql_v4.ord_term(col)`. Dropping the schemas also removes every grant on -them and their functions, and the bundle issues no `GRANT`. After the bundle -runs, and before the application sends queries: - -1. If the application connects as a role other than the one that installed - EQL, grant that role access again. The role needs `USAGE` on the - schemas `eql_v4` and `eql_v4_internal`, and `EXECUTE` on all their - functions. EQL's +Install the `eql-v4-install.sql` attached to this release. Your Go code +needs no change. `AccessKeyCredentials` and its `Secret` type are new. You +can choose to use them. + +The rc.4 bundle gives wrong results in two cases. The Fixed section +describes both. The rc.5 bundle corrects the first case and refuses the +second. If either case applies to your application, check the results it +got from rc.4. + +The bundle drops the `eql_v4` and `eql_v4_internal` schemas with `CASCADE`, +and creates them again. Your columns and their data stay, because the +column types are in the `public` schema. + +But PostgreSQL also drops every object of yours that uses an EQL function or +operator. That includes indexes, views, row-level security policies, and +`CHECK` constraints. PostgreSQL drops them without an error. When it drops a +restrictive policy, more rows of the table become visible. PostgreSQL's +notice lists only the first 100 objects it drops. + +Do these steps before you install the bundle: + +1. List your objects that use EQL. Run this query in each database that has + EQL installed: + + ```sql + WITH eql AS ( + SELECT 'pg_proc'::regclass AS classid, p.oid AS objid + FROM pg_proc p JOIN pg_namespace n ON n.oid = p.pronamespace + WHERE n.nspname IN ('eql_v4', 'eql_v4_internal') + UNION ALL + SELECT 'pg_operator'::regclass, o.oid + FROM pg_operator o JOIN pg_proc p ON p.oid = o.oprcode + JOIN pg_namespace n ON n.oid = p.pronamespace + WHERE n.nspname IN ('eql_v4', 'eql_v4_internal') + UNION ALL + SELECT 'pg_type'::regclass, t.oid + FROM pg_type t JOIN pg_namespace n ON n.oid = t.typnamespace + WHERE n.nspname IN ('eql_v4', 'eql_v4_internal') + ) + SELECT DISTINCT pg_describe_object(d.classid, d.objid, 0) AS object + FROM pg_depend d + JOIN eql ON eql.classid = d.refclassid AND eql.objid = d.refobjid + CROSS JOIN LATERAL pg_identify_object(d.classid, d.objid, 0) AS id + WHERE d.deptype = 'n' + AND coalesce(id.schema, '') NOT IN ('eql_v4', 'eql_v4_internal') + AND d.classid NOT IN ('pg_operator'::regclass, 'pg_cast'::regclass, + 'pg_amop'::regclass, 'pg_amproc'::regclass, + 'pg_opclass'::regclass, 'pg_opfamily'::regclass) + ORDER BY 1; + ``` + +2. Save the definition of each object the query lists. For example, use + `pg_dump --schema-only`, or `pg_get_viewdef` and `pg_get_indexdef`. +3. Install the bundle: `psql -f eql-v4-install.sql`. + +Do these steps after you install the bundle, and before the application +sends queries: + +4. Create each saved object again. Then run the query from step 1 again, + and check that it lists the same objects. +5. If the application connects as a role other than the one that installed + EQL, grant that role access again. The bundle issues no `GRANT`. The role + needs `USAGE` on the schemas `eql_v4` and `eql_v4_internal`, and + `EXECUTE` on all their functions. EQL's [permissions reference](../../packages/eql/docs/reference/permissions.md) lists the `GRANT` statements. The reference's examples name `eql_v3`, so write `eql_v4`. -2. Re-create the indexes, then run `ANALYZE`. - -Your Go code needs no change. `AccessKeyCredentials` is new. You can choose -to use it. +6. Run `ANALYZE`. ### Added @@ -56,35 +99,56 @@ to use it. of anything you print. `fmt` prints a value in an unexported field in full. -### Changed +### Fixed -- **The EQL v4 bundle refuses a comparison between two different EQL - types** (#1547). Before, a column of one type compared with a query - value of another type was compared as plain `jsonb`. PostgreSQL then - returned false for equal values, with no error. Now the comparison - raises `operator … is not supported for …`. An example is a +- **Comparisons on ORE columns gave wrong results when `public` was not on + the `search_path`** (#1551, #1667). ORE is order-revealing encryption. + This affected columns of the `…OrdOre` types and `TextSearchOre`. The rc.4 + functions `eql_v4.eq`, `eql_v4.lt`, `eql_v4.between`, and the other + comparison functions for these columns used a bare `<` or `=`. A session + can leave `public` off its `search_path`. Examples are a + `SECURITY DEFINER` function with `SET search_path = ''`, and a role whose + `search_path` leaves it out. In such a session, PostgreSQL used its own + record comparison for the encrypted terms. That comparison compares the + raw bytes, so the query returned the wrong rows, with no error. The rc.5 + functions name each operator with its schema, such as + `OPERATOR(public.<)`. +- **PostgreSQL raises an error when a query compares two different EQL + types** (#1547). Before, PostgreSQL compared a column of one type with a + query value of another type as plain `jsonb`. PostgreSQL then returned + false for equal values, with no error. Now the comparison raises + `operator … is not supported for …`. An example is a `public.eql_v4_text_search` column compared with `@@` against an - `eql_v4.query_text_match` value. The queries the Go SDK builds name the - matching type, so they are not affected. -- **The bundle's comparison functions name the schema of each built-in - operator and function they call** (#1551, #1667). For example, the + `eql_v4.query_text_match` value. A query that returned no rows now fails. + The queries the Go SDK builds name the matching type, so they are not + affected. +- **An oversized token lifetime no longer makes the client refresh on every + request** (#1553). The credential guest added the server's `expires_in` to + the clock without a limit. A value too large to add overflowed, so the + token looked expired already. The guest now limits a token's lifetime to + 30 days. +- **The credential guest wipes the profile files it reads** (#1553). When + it read `auth.json` or `secretkey.json`, it could leave copies of their + contents in guest memory without wiping them. The guest now reads each + file into a buffer that it wipes. +- **A failed write into guest memory no longer leaves the data in a guest + buffer** (#1550). When the client could not record where a buffer was, + the bytes stayed in guest memory. The client now checks where it will + record the buffer before it allocates one. If a write fails after the + allocation, the client zeroes the bytes. + +### Changed + +- **The bundle's other comparison functions also name the schema of each + built-in operator and function they call** (#1551). For example, the functions write `OPERATOR(pg_catalog.@>)` and - `pg_catalog.cardinality(...)`. A `search_path` that puts another schema first can no longer - change which operator a comparison uses. `eql_v4.between` gets the same + `pg_catalog.cardinality(...)`. The results of these functions do not change. - **The embedded crypto guest wipes more copies of plaintext before it frees them** (#1643). The copies were in the match index's lowercasing, the decoding of JSON paths and predicates, and the opening of a sealed JSON document. Stored values and query terms do not change. -### Fixed - -- **A failed write into guest memory no longer leaves the data in a guest - buffer** (#1550). When the client could not record where a buffer was, - the bytes stayed in guest memory. The client now checks where it will - record the buffer before it allocates one. If a write fails after the - allocation, the client zeroes the bytes. - ## [0.1.0-rc.4] - 2026-11-13 ### Upgrading from rc.3