Re: Allow LISTEN on patterns

From: Aleksander Alekseev <aleksander(at)timescale(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: Quan Zongliang <quanzongliang(at)yeah(dot)net>
Subject: Re: Allow LISTEN on patterns
Date: 2025-03-05 14:03:46
Message-ID: CAJ7c6TPaCKsaONXak3VDmvgex7r0-WAk2AJ+YyZyZK=ktCrgfA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

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

The overall idea seems reasonable. It would be nice to have such a
feature as long as it doesn't affect the performance of the existing
applications. I think we should discuss particular semantics though.
For instance, if I do:

```
LISTEN aaafoo;
LISTEN aaabar;
UNLISTEN aaa%;
```

Should I:

A. be unsubscribed from aaafoo and aaabar since both match aaa% or
B. UNLISTEN should have no effect since I never subscribed to aaa% explicitly?

Personally I would expect A, but I'm not sure how many people will agree.

--
Best regards,
Aleksander Alekseev

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2025-03-05 14:18:16 Re: per backend WAL statistics
Previous Message David G. Johnston 2025-03-05 13:54:55 Re: Allow database owners to CREATE EVENT TRIGGER