Re: LISTEN & NOTIFY data

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: LISTEN & NOTIFY data
Дата
Msg-id 12761.1007389888@sss.pgh.pa.us
обсуждение исходный текст
Ответ на LISTEN & NOTIFY data  (Burra <burra@colorado.edu>)
Ответы Re: LISTEN & NOTIFY data  (Burra <burra@colorado.edu>)
Список pgsql-novice
Burra <burra@colorado.edu> writes:
> Is there any way to send data along with the NOTIFY command... like
> possibly oid?

Put the data you need into a table, and use NOTIFY as a signal that
it's time to look into that table.  Anything else can't work because
of the signal-ish nature of NOTIFY --- in particular, that if the same
condition is signaled multiple times while you are within a transaction
block, you'll get just one notification when you come out of the
transaction.  If you tried to piggyback OIDs on the messages, you'd lose
all but one.

You may care to study the advice given on the NOTIFY reference page.

            regards, tom lane

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

Предыдущее
От: Burra
Дата:
Сообщение: LISTEN & NOTIFY data
Следующее
От: Burra
Дата:
Сообщение: Re: LISTEN & NOTIFY data