PgQue icon indicating copy to clipboard operation
PgQue copied to clipboard

fix(partition-keys): expose stable named arguments for 0.3 APIs

Open NikolayS opened this issue 4 months ago • 1 comments

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.sql
  • devel/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.

NikolayS avatar Jul 10 '26 09:07 NikolayS

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

NikolayS avatar Nov 21 '26 16:11 NikolayS