Re: Discussion on a LISTEN-ALL syntax

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Trey Boudreau <trey(at)treysoft(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Discussion on a LISTEN-ALL syntax
Date: 2024-12-20 20:58:29
Message-ID: 727992.1734728309@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Trey Boudreau <trey(at)treysoft(dot)com> writes:
> so I'd like to propose a 'LISTEN *' equivalent to 'UNLISTEN *'.

Seems reasonable in the abstract, and given the UNLISTEN * precedent
it's hard to quibble with that syntax choice. I think what actually
needs discussing are the semantics, specifically how this'd interact
with other LISTEN/UNLISTEN actions. Explain what you think should
be the behavior after:

LISTEN foo;
LISTEN *;
UNLISTEN *;
-- are we still listening on foo?

LISTEN *;
LISTEN foo;
UNLISTEN *;
-- how about now?

LISTEN *;
UNLISTEN foo;
-- how about now?

LISTEN *;
LISTEN foo;
UNLISTEN foo;
-- does that make a difference?

I don't have any strong preferences about this, but we ought to
have a clear idea of the behavior we want before we start coding.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Trey Boudreau 2024-12-20 21:41:51 Re: Discussion on a LISTEN-ALL syntax
Previous Message Nathan Bossart 2024-12-20 19:46:20 Re: allow changing autovacuum_max_workers without restarting