Time-based trigger

Поиск
Список
Период
Сортировка
От Robert Sosinski
Тема Time-based trigger
Дата
Msg-id 689D39ED76CF4967B823E2718CF15A82@ticketevolution.com
обсуждение исходный текст
Ответы Re: Time-based trigger  (Szymon Guz <mabewlun@gmail.com>)
Re: Time-based trigger  (Steve Crawford <scrawford@pinpointresearch.com>)
Список pgsql-general
We have a table, which has items that can be put on hold of 5 minutes (this is for an online store) once they are placed into a cart.  What we need is for this hold to automatically expire after 5 minutes.  Right now, we put a time stamp into the row (called hold_until) at 5 minutes into the future, and select items where hold_until is less then now().

Would it be possible to change this to using a boolean that is set to true when item is put on hold, and have something like a time-based trigger automatically update the held boolean to false after 5 minutes pass.

Thanks,

-- 
Robert Sosinski

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

Предыдущее
От: Raymond O'Donnell
Дата:
Сообщение: Re: On Ubuntu 12.04 i do have two psql one of those isn't working
Следующее
От: Szymon Guz
Дата:
Сообщение: Re: Time-based trigger