Skip site navigation (1) Skip section navigation (2)

new notify payload as string

From: "A(dot)M(dot)" <agentm(at)themactionfaction(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: new notify payload as string
Date: 2010-08-25 19:18:03
Message-ID: 6E2F0538-3972-4904-BA0C-44D1654E620B@themactionfaction.com (view raw or flat)
Thread:
Lists: pgsql-hackers
With 9.0b4, I am testing the new NOTIFY payload feature. One thing I noticed is that it seems impossible to differentiate at 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 payload due to the backend protocol defining the payload as a string. Perhaps a boolean could be added to the backend protocol to 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 being used without a payload.

Cheers,
M

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2010-08-25 19:28:34
Subject: Re: [GENERAL] initdb fails to allocate shared memory
Previous:From: Robert HaasDate: 2010-08-25 18:39:13
Subject: Re: git: uh-oh

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group