pqgithub.com/lib/pq/cmd/pqlisten

pqlisten command

Command pqlisten is a self-contained Go program which uses the LISTEN / NOTIFY mechanism to avoid polling the database while waiting for more work to arrive.

You can see the program in action by defining a function similar to the following:

CREATE OR REPLACE FUNCTION public.get_work()
  RETURNS bigint
  LANGUAGE sql
  AS $$
    SELECT CASE WHEN random() >= 0.2 THEN int8 '1' END
  $$
;
Version
v1.11.2
Published
Feb 10, 2026
Platform
linux/amd64
Imports
6 packages
Last checked
4 hours ago

Tools for package owners.