Re: proposal: make NOTIFY list de-duplication optional

Поиск
Список
Период
Сортировка
От Catalin Iacob
Тема Re: proposal: make NOTIFY list de-duplication optional
Дата
Msg-id CAHg_5grojD+2CNW9UULOGkB5uLf4XJ3ntzRHPX_J=C2BGrRbaw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: proposal: make NOTIFY list de-duplication optional  (Filip Rembiałkowski <filip.rembialkowski@gmail.com>)
Список pgsql-hackers
On Sat, Feb 20, 2016 at 2:00 PM, Filip Rembiałkowski
<filip.rembialkowski@gmail.com> wrote:
> I was stuck because both syntaxes have their ugliness. NOTIFY allows the
> payload to be NULL:
> NOTIFY chan01;
>
> How would this look like in "never" mode?
> NOTIFY chan01, NULL, 'never'; -- seems very cryptic.

The docs say:
"The information passed to the client for a notification event
includes the notification channel name, the notifying session's server
process PID, and the payload string, which is an empty string if it
has not been specified."

So a missing payload is not a SQL NULL but an empty string. This means
you would have:
NOTIFY chan01;
NOTIFY chan01, ''; -- same as above
NOTIFY chan01, '', 'maybe'; -- same as above
NOTIFY chan01, '', 'never'; -- send this all the time

Seems ok to me.



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Thomas Munro
Дата:
Сообщение: Re: postgres_fdw vs. force_parallel_mode on ppc
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Writing new unit tests with PostgresNode