fix(partition-keys): expose stable named arguments for 0.3 APIs
Severity
Medium — documented public API does not resolve.
Problem
The partition-key and idempotency specs document named-argument calls, and the existing PgQue API treats argument names as part of its compatibility surface. New 0.3 functions expose internal i_* catalog names instead.
These documented calls fail function resolution:
select pgque.send(
'q', 'job', '{}'::jsonb,
partition_key => 'tenant-1'
);
select * from pgque.send_idem(
'q', 'job', '{}'::jsonb,
idem_key => 'k',
ttl => interval '1 hour',
partition_key => 'tenant-1'
);
select pgque.subscribe_slot(
queue => 'q', consumer => 'c', slot => 0, n => 1
);
Affected public functions are in:
devel/sql/pgque-api/partition_keys.sqldevel/sql/pgque-api/send_idem.sql
Expected fix
Choose and expose stable public names such as queue_name, type_name, payload, partition_key, idem_key, ttl, consumer, slot, n, worker, and max_return.
PostgreSQL cannot rename input arguments via CREATE OR REPLACE, so the alpha→final install path must deliberately drop/recreate these unreleased signatures while preserving ownership/grants.
Add named-call coverage for every new public function, including both text/jsonb overloads and default arguments.
Shipped in v0.3.0-rc.2 (merged to main via #395 at f4c7457): https://github.com/NikolayS/PgQue/releases/tag/v0.3.0-rc.2