jsonb_path_query row by row is quadratic on PostgreSQL 17: a document of
200k numbers under the cap ran into the statement timeout. One
jsonb_path_query_array call, then its elements. pgTAP 017 saves 600 000
numbers; the perf suite times 600k (saved) and 1M (closed code) over HTTP.
check_document_structure sums the numbers' printed digits one at a time
before building the whole text, so huge exponents answer
document.too_large instead of an out-of-memory error. pgTAP 020: the
full AR-1 B matrix and the rights RPCs refused to every non-owner; 017:
exponent vectors, the number bomb, publish.species.other alone.
M6 option A: grant_catalog_right no longer refuses an owner granting
itself sheet_reviewer; authors stay refused at acknowledgment, approval
and publication. The document cap is the UTF-8 bytes of the JSON text:
check_document_structure drops pg_column_size and M5 replaces the base
table CHECK by octet_length(content::text). pgTAP 015 and 017 cover the
owner-reviewer journey and cap - 1, cap, cap + 1, multi-byte, dense.
Save and submit lock the sheet before the version; change_note length and a
blank FR name answer closed codes; pgTAP for a capability refused to a
factorless account and the five remaining historical-sheet RPC refusals.
Approval needs an active sheet (lock sheet, version, round); a base only
from a still-published round version; rights.mfa before rights.capability;
withdrawal of a published round refused; approver separation at publish;
deprecate and working copy serialised; closed codes; append-only acks;
upload policy bound to the registering editor. pgTAP 017-019 added.