new notify payload as string - Mailing list pgsql-hackers

From A.M.
Subject new notify payload as string
Date
Msg-id 6E2F0538-3972-4904-BA0C-44D1654E620B@themactionfaction.com
Whole thread Raw
Responses Re: new notify payload as string  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
With 9.0b4, I am testing the new NOTIFY payload feature. One thing I noticed is that it seems impossible to
differentiateat the receiving end from: 

NOTIFY test;

and

NOTIFY test,'';

So, it is impossible to differentiate between a notification with an empty string payload and a notification without a
payloaddue to the backend protocol defining the payload as a string. Perhaps a boolean could be added to the backend
protocolto account for this and then "extra" could be set to NULL in libpq. 

This could be handy when converting codebases that use LISTEN/NOTIFY when one wishes to be warned of "old" NOTIFYs
beingused without a payload. 

Cheers,
M

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: git: uh-oh
Next
From: Tom Lane
Date:
Subject: Re: [GENERAL] initdb fails to allocate shared memory