Search Postgresql Archives

Re: Using xmin to identify last modified rows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Stéphane A. Schildknecht" <stephane.schildknecht@xxxxxxxxxxxxxxxx> 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!

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux