You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Several of my tasks require passing additional options to
`df.http` and `df.http_multipart`. Unfortunately, adding new
parameters to these functions is not possible without breaking
users who don't run `ALTER EXTENSION UPDATE`, even if those
parameters use `pgrx::default!`. This is a new combinator
function that manipulates the durofut JSON directly to add the
options, for example, you'd use it like:
```sql
df.with_http_options(
df.http(...),
'{"options": "here"}'::jsonb
);
```
This admittedly is less ergonomic than adding an `options =>`
parameter for `df.http`, which is what my first pass at this
did (see thomcc-work@79e26003
for my abandoned work along that approch).
If we want, we could make this into an operator, e.g. allowing
`df.http(...) <some-operator> '{"options": "here"}'` or
something like that. I don't have strong feelings.
Copy file name to clipboardExpand all lines: docs/upgrade-testing.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -203,6 +203,15 @@ gate, so they never need to be added to the exclude list.
203
203
Each schema-changing PR should add a section here documenting what changed,
204
204
what the upgrade script handles, and any backward compatibility considerations.
205
205
206
+
### v0.2.7 → v0.2.8
207
+
208
+
#### Add `df.with_http_options()` without changing the HTTP ABI
209
+
-**DDL change:** Adds `df.with_http_options(fut text, options jsonb) RETURNS text`. The input must be a single `HTTP` or `HTTP_MULTIPART` node. No option keys are supported yet: SQL `NULL` and `{}` return the original node text byte-for-byte; other values and unsupported keys raise an error.
210
+
-**Upgrade script:**[sql/pg_durable--0.2.7--0.2.8.sql](../sql/pg_durable--0.2.7--0.2.8.sql) adds only this helper. The existing HTTP functions, their grant/revoke helpers, OIDs, ACLs, and dependent objects are untouched. The new helper uses the same schema-access and default PUBLIC `EXECUTE` model as other combinators; it does not grant HTTP access.
211
+
-**Scenario A considerations:** The added function matches pgrx-generated fresh-install SQL, including argument names, null handling and the `with_http_options_wrapper` C symbol.
212
+
-**Scenario B1 considerations:** Both legacy HTTP wrappers retain their five-argument ABI. Merely changing the activity's `to_regprocedure()` lookup cannot make a six-argument C wrapper callable through a five-argument catalog entry. The B1 tests now invoke `df.http()` on every supported old schema (v0.2.2+) and `df.http_multipart()` where present (v0.2.5+), using both defaulted and explicit arguments without an extension update. The new helper remains absent until `ALTER EXTENSION UPDATE`, while existing HTTP construction continues to work. Missing catalog functions are still denied explicitly by the activity checks.
213
+
-**Scenario B2 considerations:** No node-config or history-format changes. The upgrade tests verify that legacy HTTP OIDs and ACLs (including `WITH GRANT OPTION`) survive, that dependent views still work, and that the newly added helper preserves their node text.
0 commit comments