Re: Discussion on a LISTEN-ALL syntax

From: Vik Fearing <vik(at)postgresfriends(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: Trey Boudreau <trey(at)treysoft(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Discussion on a LISTEN-ALL syntax
Date: 2024-12-21 04:12:19
Message-ID: 1491801c-0dd7-44d4-bc14-0695ca6f025f@postgresfriends.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 20/12/2024 23:45, Tom Lane wrote:
> Don't think that quite flies. We might have to regurgitate the
> state explicitly:
>
> LISTEN *
> UNLISTEN foo.*
> LISTEN foo.bar.*
>
> showing that we're listening to channels foo.bar.*, but not other
> channels beginning "foo", and also to all channels not beginning
> "foo".

Could I perhaps propose a sort of wildmat[1] syntax?

The above sequence could be expressed simply as:

    LISTEN *,!foo.*,foo.bar.*

I would like this in psql's backslash commands, too.

[1] https://en.wikipedia.org/wiki/Wildmat

--

Vik Fearing

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2024-12-21 04:23:29 Re: Discussion on a LISTEN-ALL syntax
Previous Message jian he 2024-12-21 04:05:12 wrong comments in ClassifyUtilityCommandAsReadOnly