Re: LISTEN & NOTIFY data

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Burra <burra(at)colorado(dot)edu>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: LISTEN & NOTIFY data
Date: 2001-12-03 14:31:28
Message-ID: 12761.1007389888@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Burra <burra(at)colorado(dot)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

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Burra 2001-12-03 16:04:55 Re: LISTEN & NOTIFY data
Previous Message Burra 2001-12-03 13:44:17 LISTEN & NOTIFY data