Re: Using xmin to identify last modified rows
От | Gregory Stark |
---|---|
Тема | Re: Using xmin to identify last modified rows |
Дата | |
Msg-id | 871vtmveif.fsf@oxford.xeocode.com обсуждение исходный текст |
Ответ на | Using xmin to identify last modified rows ("Stéphane A. Schildknecht"<stephane.schildknecht@postgresqlfr.org>) |
Ответы |
Re: Using xmin to identify last modified rows
Re: Using xmin to identify last modified rows |
Список | pgsql-general |
"Stéphane A. Schildknecht" <stephane.schildknecht@postgresqlfr.org> writes: > But, trying the same query on a non slonified DB, I got an error, as there is > no ordering operator for xid. > > I think that in the slon case, the query uses the implicit cast xid->xxid, and > then the operator to sort xxid. You could order by age(xmin) instead > What would be the best way to get last modified rows? I'm not sure using xmin is such a great idea really. It's handy for ad-hoc queries but there are all kinds of cases where it might not give you the results you expect. You probably want to put a timestamp column on your tables and manage the date you put in their according to a policy you control. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's 24x7 Postgres support!
В списке pgsql-general по дате отправления: