| From: | Catalin Iacob <iacobcatalin(at)gmail(dot)com> |
|---|---|
| To: | Filip Rembiałkowski <filip(dot)rembialkowski(at)gmail(dot)com> |
| Cc: | Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: proposal: make NOTIFY list de-duplication optional |
| Date: | 2016-02-22 05:53:54 |
| Message-ID: | CAHg_5grojD+2CNW9UULOGkB5uLf4XJ3ntzRHPX_J=C2BGrRbaw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Sat, Feb 20, 2016 at 2:00 PM, Filip Rembiałkowski
<filip(dot)rembialkowski(at)gmail(dot)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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Paquier | 2016-02-22 06:30:11 | Re: Writing new unit tests with PostgresNode |
| Previous Message | Sridhar N Bamandlapally | 2016-02-22 05:35:11 | Re: JDBC behaviour |