Обсуждение: back-end triggers front-end to update

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

back-end triggers front-end to update

От
"Adam O'Toole"
Дата:
Hello everyone,I am searching for a way to have my postgresql 7.4.7 backend be triggered to let the front end know
therehas been a change to the database. If more then one person is connected to the database and person (x) makes a
change,I want other clients to then be aware of that, and refresh there screen so they are not then looking at out of
datedata. Any insight?  Thank you so much, have a great day.Adam O'Toole 

Re: back-end triggers front-end to update

От
Scott Marlowe
Дата:
On Tue, 2005-07-26 at 16:25, Adam O'Toole wrote:
> Hello everyone,
> I am searching for a way to have my postgresql 7.4.7 backend be
> triggered to let the front end know there has been a change to the
> database. If more then one person is connected to the database and
> person (x) makes a change, I want other clients to then be aware of
> that, and refresh there screen so they are not then looking at out of
> date data.
> Any insight?  Thank you so much, have a great day.

I believe the tools you are looking for are triggers and notify /
listen...

Re: back-end triggers front-end to update

От
Roman Neuhauser
Дата:
# adamnb1@hotmail.com / 2005-07-26 18:25:23 -0300:
> <html><div style='background-color:'><DIV class=RTE>Hello everyone,<BR>I am searching for a way to have my postgresql
7.4.7backend be triggered to let the front end know there has been a change to the database. If more then one person is
connectedto the database and person (x) makes a change, I want other clients to then be aware of that, and refresh
therescreen so they are not then looking at out of date data. <BR>Any insight?  Thank you so much, have a great
day.<BR>AdamO'Toole </DIV></div></html> 

    Please keep HTML out of email unless necessary to convey structure
    and/or meaning.

    See LISTEN(7) and NOTIFY(7).

--
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE.             http://bash.org/?255991

Re: back-end triggers front-end to update

От
Karsten Hilbert
Дата:
On Tue, Jul 26, 2005 at 06:25:23PM -0300, Adam O'Toole wrote:

> I am searching for a way to have my postgresql 7.4.7 backend be triggered to
> let the front end know there has been a change to the database. If more then
> one person is connected to the database and person (x) makes a change, I want
> other clients to then be aware of that, and refresh there screen so they are
> not then looking at out of date data.
> Any insight?  Thank you so much, have a great day.

GNUmed has a complete Python implementation of what you
describe. We are using triggers and listen/notify as others
suggested. Look at client/pycommon/gmBackendListener.py for
the middleware, then server/sql/gmNotifications.sql for the
schema support, and server/bootstrap/gmNotificationSchemaGenerator.py
for a way to generate the needed triggers at the time of
bootstrapping the database.

 http://salaam.homeunix.com/~ncq/gnumed/snapshot/gnumed-latest-snapshot.tgz

Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346