Re: Data in table changed?

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: Data in table changed?
Дата
Msg-id 20040302141150.GZ7060@ns.snowman.net
обсуждение исходный текст
Ответ на Data in table changed?  ("Thomas Holmgren" <thm@regnecentralen.dk>)
Список pgsql-general
* Thomas Holmgren (thm@regnecentralen.dk) wrote:
> I have a large number of clients synchronizing with a central database.
> The clients update their local data by polling the database for changes
> at fixed intervals. I need an efficient way of determining if data in a
> table has been changed (either updated, deleted or inserted). Can this
> be achieved without scanning the tables using expensive SQL? (my tables
> are _big_!) Is there some way to get a "time for last update" for a
> specific table? Or something similar I can use?

I would guess that you could create a trigger for the tables which
updates a seperate (small) table with the last-changed timestamp.

    Stephen

Вложения

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

Предыдущее
От: "Thomas Holmgren"
Дата:
Сообщение: Data in table changed?
Следующее
От: scrappy@PostgreSQL.org
Дата:
Сообщение: My photoalbum