Fix pg_durable documentation examples#257
Open
tjgreen42 wants to merge 2 commits into
Open
Conversation
The Quick Example used `id = ANY($batch)`, but a bare $var substitutes only the first column of the first captured row as a scalar, so the generated SQL was `id = ANY(1)` and failed with "op ANY/ALL (array) requires array on right side". Use the $batch.* row-set expansion instead, referencing the captured result as a subquery: `id IN (SELECT id FROM $batch.*)`.
pinodeca
approved these changes
Jun 18, 2026
pinodeca
left a comment
Contributor
There was a problem hiding this comment.
Thanks for catching this!
pinodeca
approved these changes
Jun 19, 2026
pinodeca
left a comment
Contributor
There was a problem hiding this comment.
LGTM! Thanks for QA-testing our docs!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Testing the README and user-facing documentation examples found several result-substitution issues:
$varcapture substitutes only the first column of the first row, so the generated SQL was invalid.USER_GUIDE.mdhad additional examples with the same scalar-vs-row-set issue, unqualified playground tables, duplicate unnamed substituted columns, and signal workflows that capturedorder/docbut referenced undefined$order_id/$doc_id.docs/spec-signals.mdduplicated the signal capture-reference mistakes.Fix
$batch.*row-set expansion where examples pass captured row sets between steps.playgroundschema from the appendix.$order.idand$doc.idin signal examples.Verification
Tested against pgrx-managed PostgreSQL 17 and 18 instances built from this PR branch:
df.if_rows(), configurable ETL, row-set expansion, and signal timeout flows.docs/SCENARIOS.mdcopy-paste scenarios completed; the scheduled HTTP scenario was started, observed through its first insert, then cancelled.azure-functions,azure-http-domains, andinvoice-approval.docs/spec-signals.mdcompleted with expected state changes.