Record last SELECT on a row?
| От | Matthias Leisi |
|---|---|
| Тема | Record last SELECT on a row? |
| Дата | |
| Msg-id | 287E4DF6-35A2-4062-AEBA-32DB1DE35C5D@leisi.net обсуждение исходный текст |
| Ответы |
Re: Record last SELECT on a row?
Re: Record last SELECT on a row? Re: Record last SELECT on a row? Re: Record last SELECT on a row? Re: Record last SELECT on a row? Record last SELECT on a row? |
| Список | pgsql-general |
An application (which we can’t change) is accessing some Postgres table, and we would like to record when the rows in thattable were last read (meaning: appeared in a SELECT result). The ultimate goal would be that we can „age out“ rows whichhave not been accessed in a certain period of time. The table contains some ten thousand rows, five columns, and we already record created / last updated using triggers. Almostall accesses will result in zero, one or very few records returned. Given the modest size of the table, performanceconsiderations are not top priority. If we had full control over the application, we could eg use a function to select the records and then update some „lastread“ column. But since we don’t control the application, that’s not an option. On the other hand, we have full controlover the database, so we could put some other „object“ in lieu of the direct table. Any other ways this could be achieved? Thanks, Matthias
В списке pgsql-general по дате отправления: