Re: Correct/optimal DML query for application session management ?
В списке pgsql-general по дате отправления:
| От | Alban Hertroys |
|---|---|
| Тема | Re: Correct/optimal DML query for application session management ? |
| Дата | |
| Msg-id | 7DD40C2A-1698-4C3F-BA26-49974C468AEE@gmail.com обсуждение исходный текст |
| Ответ на | Correct/optimal DML query for application session management ? (Tim Smith <randomdev4+postgres@gmail.com>) |
| Список | pgsql-general |
> On 06 Jan 2015, at 19:02, Tim Smith <randomdev4+postgres@gmail.com> wrote: > create table app_sessions( > session_id char(64) unique not null, > user_id char(32) unique not null, > session_start bigint not null, > session_lastactive bigint not null > ); Just an observation: Are you sure that you don’t want to allow your users to have multiple sessions? You made users uniqueacross the entire table, which mean there can only ever be one session for a user. Unless you delete ‘expired’ sessionsASAP, users won’t be able to start a new session again after their original session expired. That may be desirable for your application and thus intended, but perhaps it was not? Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll find there is no forest.
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера