Обсуждение: Howto access payload of notify?

Поиск
Список
Период
Сортировка

Howto access payload of notify?

От
Clemens Eisserer
Дата:
Hi,

I would like to use the new feature of submitting payload with notify,
how can I access this data when listening with an jdbc client.

PGNotification seems to lack a getPayload() method.

Thank you in advance, Clemens

Re: Howto access payload of notify?

От
Thomas Kellerer
Дата:
Clemens Eisserer wrote on 16.01.2011 11:51:
> Hi,
>
> I would like to use the new feature of submitting payload with notify,
> how can I access this data when listening with an jdbc client.
>
> PGNotification seems to lack a getPayload() method.
>
> Thank you in advance, Clemens
>

the method is called getParameter():

This is the Javadoc for it:

Returns additional information from the notifying process.
This feature has only been implemented in server versions 9.0
and later, so previous versions will always return an empty String.

Regards
Thomas