Function Index

B |
| batch_event_sql(1), pgq
| batch_event_tables(1), pgq
| batch_retry(2), pgq
C |
| create_queue(1), pgq
| current_event_table(1), pgq
D |
| drop_queue(1), pgq
| drop_queue(2), pgq
E |
| event_retry(3a), pgq
| event_retry(3b), pgq
| event_retry_raw(12), pgq
F |
| find_tick_helper(6), pgq
| finish_batch(1), pgq
| force_tick(2), pgq
G |
| get_batch_cursor(3), pgq
| get_batch_cursor(4), pgq
| get_batch_events(1), pgq
| get_batch_info(1), pgq
| get_consumer_info(0), pgq
| get_consumer_info(1), pgq
| get_consumer_info(2), pgq
| get_queue_info(0), pgq
| get_queue_info(1), pgq
| grant_perms(1), pgq
| grant_perms_from(1), pgq
I |
| insert_event(3), pgq
| insert_event(7), pgq
J |
| jsontriga, pgq
L |
| logutriga, pgq

> pgq.batch_event_sql( | x_batch_id | bigint | ) returns text

Creates SELECT statement that fetches events for this batch.

> pgq.batch_event_tables( | x_batch_id | bigint | ) returns setof text

Returns set of table names where this batch events may reside.

> pgq.batch_retry( | i_batch_id | bigint,
> | i_retry_seconds | integer | ) returns integer

Put whole batch into retry queue, to be processed again later.

> pgq.create_queue( | i_queue_name | text | ) returns integer

Creates new queue with given name.

> pgq.current_event_table( | x_queue_name | text | ) returns text

Return active event table for particular queue.

> pgq.drop_queue( | x_queue_name | text | ) returns integer

Drop queue and all associated tables.

> pgq.drop_queue( | x_queue_name | text,
> | x_force | bool | ) returns integer

Drop queue and all associated tables.

> pgq.event_retry( | x_batch_id | bigint,
> | x_event_id | bigint,
> | x_retry_time | timestamptz | ) returns integer

Put the event into retry queue, to be processed again later.

> pgq.event_retry( | x_batch_id | bigint,
> | x_event_id | bigint,
> | x_retry_seconds | integer | ) returns integer

Put the event into retry queue, to be processed later again.

> pgq.event_retry_raw( | x_queue | text,
> | x_consumer | text,
> | x_retry_after | timestamptz,
> | x_ev_id | bigint,
> | x_ev_time | timestamptz,
> | x_ev_retry | integer,
> | x_ev_type | text,
> | x_ev_data | text,
> | x_ev_extra1 | text,
> | x_ev_extra2 | text,
> | x_ev_extra3 | text,
> | x_ev_extra4 | text | ) returns bigint

Allows full control over what goes to retry queue.

> pgq.find_tick_helper( | in | i_queue_id | int4,
> | in | i_prev_tick_id | int8,
> | in | i_prev_tick_time | timestamptz,
> | in | i_prev_tick_seq | int8,
> | in | i_min_count | int8,
> | in | i_min_interval | interval,
> | out | next_tick_id | int8,
> | out | next_tick_time | timestamptz,
> | out | next_tick_seq | int8 | ) as

Helper function for pgq.next_batch_custom() to do extended tick search.

> pgq.finish_batch( | x_batch_id | bigint | ) returns integer

Closes a batch.

> pgq.force_tick( | i_queue_name | text | ) returns bigint

Simulate lots of events happening to force ticker to tick.

> pgq.get_batch_cursor( | in | i_batch_id | bigint,
> | in | i_cursor_name | text,
> | in | i_quick_limit | int4,
> | out | ev_id | bigint,
> | out | ev_time | timestamptz,
> | out | ev_txid | bigint,
> | out | ev_retry | int4,
> | out | ev_type | text,
> | out | ev_data | text,
> | out | ev_extra1 | text,
> | out | ev_extra2 | text,
> | out | ev_extra3 | text,
> | out | ev_extra4 | text | ) returns setof record

Get events in batch using a cursor.

> pgq.get_batch_cursor( | in | i_batch_id | bigint,
> | in | i_cursor_name | text,
> | in | i_quick_limit | int4,
> | in | i_extra_where | text,
> | out | ev_id | bigint,
> | out | ev_time | timestamptz,
> | out | ev_txid | bigint,
> | out | ev_retry | int4,
> | out | ev_type | text,
> | out | ev_data | text,
> | out | ev_extra1 | text,
> | out | ev_extra2 | text,
> | out | ev_extra3 | text,
> | out | ev_extra4 | text | ) returns setof record

Get events in batch using a cursor.

> pgq.get_batch_events( | in | x_batch_id | bigint,
> | out | ev_id | bigint,
> | out | ev_time | timestamptz,
> | out | ev_txid | bigint,
> | out | ev_retry | int4,
> | out | ev_type | text,
> | out | ev_data | text,
> | out | ev_extra1 | text,
> | out | ev_extra2 | text,
> | out | ev_extra3 | text,
> | out | ev_extra4 | text | ) returns setof record

Get all events in batch.

> pgq.get_batch_info( | in | x_batch_id | bigint,
> | out | queue_name | text,
> | out | consumer_name | text,
> | out | batch_start | timestamptz,
> | out | batch_end | timestamptz,
> | out | prev_tick_id | bigint,
> | out | tick_id | bigint,
> | out | lag | interval,
> | out | seq_start | bigint,
> | out | seq_end | bigint | ) as

Returns detailed info about a batch.

> pgq.get_consumer_info( | out | queue_name | text,
> | out | consumer_name | text,
> | out | lag | interval,
> | out | last_seen | interval,
> | out | last_tick | bigint,
> | out | current_batch | bigint,
> | out | next_tick | bigint,
> | out | pending_events | bigint | ) returns setof record

Returns info about all consumers on all queues.

> pgq.get_consumer_info( | in | i_queue_name | text,
> | out | queue_name | text,
> | out | consumer_name | text,
> | out | lag | interval,
> | out | last_seen | interval,
> | out | last_tick | bigint,
> | out | current_batch | bigint,
> | out | next_tick | bigint,
> | out | pending_events | bigint | ) returns setof record

Returns info about all consumers on single queue.

> pgq.get_consumer_info( | in | i_queue_name | text,
> | in | i_consumer_name | text,
> | out | queue_name | text,
> | out | consumer_name | text,
> | out | lag | interval,
> | out | last_seen | interval,
> | out | last_tick | bigint,
> | out | current_batch | bigint,
> | out | next_tick | bigint,
> | out | pending_events | bigint | ) returns setof record

Get info about particular consumer on particular queue.

> pgq.get_queue_info( | out | queue_name | text,
> | out | queue_ntables | integer,
> | out | queue_cur_table | integer,
> | out | queue_rotation_period | interval,
> | out | queue_switch_time | timestamptz,
> | out | queue_external_ticker | boolean,
> | out | queue_ticker_paused | boolean,
> | out | queue_ticker_max_count | integer,
> | out | queue_ticker_max_lag | interval,
> | out | queue_ticker_idle_period | interval,
> | out | ticker_lag | interval,
> | out | ev_per_sec | float8,
> | out | ev_new | bigint,
> | out | last_tick_id | bigint | ) returns setof record

Get info about all queues.

> pgq.get_queue_info( | in | i_queue_name | text,
> | out | queue_name | text,
> | out | queue_ntables | integer,
> | out | queue_cur_table | integer,
> | out | queue_rotation_period | interval,
> | out | queue_switch_time | timestamptz,
> | out | queue_external_ticker | boolean,
> | out | queue_ticker_paused | boolean,
> | out | queue_ticker_max_count | integer,
> | out | queue_ticker_max_lag | interval,
> | out | queue_ticker_idle_period | interval,
> | out | ticker_lag | interval,
> | out | ev_per_sec | float8,
> | out | ev_new | bigint,
> | out | last_tick_id | bigint | ) returns setof record

Get info about particular queue.

> pgq.grant_perms( | x_queue_name | text | ) returns integer

Make event tables readable by public.
Copy grants from one table to another.

> pgq.insert_event( | queue_name | text,
> | ev_type | text,
> | ev_data | text | ) returns bigint

Insert a event into queue.

> pgq.insert_event( | queue_name | text,
> | ev_type | text,
> | ev_data | text,
> | ev_extra1 | text,
> | ev_extra2 | text,
> | ev_extra3 | text,
> | ev_extra4 | text | ) returns bigint

Insert a event into queue with all the extra fields.
Trigger function that puts row data in JSON-encoded form into queue.
Trigger function that puts row data in urlencoded form into queue.
Close