Allow LISTEN on patterns

From: Quan Zongliang <quanzongliang(at)yeah(dot)net>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Allow LISTEN on patterns
Date: 2025-03-04 04:39:45
Message-ID: 8d39e9fc-5ab9-40e7-8f94-6dcfe2a57370@yeah.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I implemented a LISTEN command that supports matching names in the LIKE
format.

Just like

LISTEN 'c%';
NOTIFY c1;NOTIFY c2;

Notifications are received for c1 and c2.

For grammatical reasons, LISTEN 'v_'; with LISTEN v_; It's weird.

Should it be defined in a way that makes it easier to distinguish?
And support for more matching patterns.

For example
LISTEN [LIKE] 'like_pattern';
LISTEN SIMILAR 'regex_pattern';

--
Zongliang Quan

Attachment Content-Type Size
listen-pattern.patch text/plain 18.4 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2025-03-04 04:45:21 Re: Log connection establishment timings
Previous Message Thomas Munro 2025-03-04 04:10:49 Re: [PoC] Federated Authn/z with OAUTHBEARER