Feature request: NOTIFY enhancement

Поиск
Список
Период
Сортировка
От CN
Тема Feature request: NOTIFY enhancement
Дата
Msg-id 1199376678.6148.1229295417@webmail.messagingengine.com
обсуждение исходный текст
Ответы Re: Feature request: NOTIFY enhancement  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-general
Dear developers,

With the existing single-notification-value mechanism, not only
SELECT'ing tables are necessary in some cases but DELETE'ing rows and
synchronizing the DELETE are also required in many cases where there are
multiple client connections to the same database.

As an example, supposing there are 3 client connections to a database,
c1, c2, and c3. C1 updates a row with primary key value "cust A" on
table "customer". Then c1 notifies all clients to refresh their local
data only for "cust A". The present implementation requires c2 and c3 to
read all rows from table "customer" instead of just one row that has
primary key value "cust A".

Probably one will implement an additional table, say tableX, so that c1
will first insert value "cust A" into tableX and then do the
notification. Sure c2 and c3 can first check tableX so they can
determine how to proceed. Problem is who is responsible for the delete
of row from tableX, and when and which row! This is really complicate
because c1, c2, or c3 can update the row for "cust B" any time later,
too.

I am not sure if I am asking too much but does it make sense, and is it
possible, to enhance NOTIFY that process "name/value" pair? Like this:

NOTIFY "MyName=MyValue";

With the capability of name/value pair, the listener will not have to
check notification details by reading tables.

Thank you!

CN

--
http://www.fastmail.fm - The professional email service


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

Предыдущее
От: "Pavel Stehule"
Дата:
Сообщение: Re: C-Extenions for PostgreSQL, Call Convention Version 0
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Feature request: NOTIFY enhancement