Re: Discussion on a LISTEN-ALL syntax - Mailing list pgsql-hackers

From Vik Fearing
Subject Re: Discussion on a LISTEN-ALL syntax
Date
Msg-id 1491801c-0dd7-44d4-bc14-0695ca6f025f@postgresfriends.org
Whole thread Raw
In response to Re: Discussion on a LISTEN-ALL syntax  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Discussion on a LISTEN-ALL syntax
List 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




pgsql-hackers by date:

Previous
From: jian he
Date:
Subject: wrong comments in ClassifyUtilityCommandAsReadOnly
Next
From: Tom Lane
Date:
Subject: Re: Discussion on a LISTEN-ALL syntax