Re: [GENERAL] Using xmin to identify last modified rows

2009-02-25 Thread Tom Lane
Richard Broersma writes: > On Wed, Feb 25, 2009 at 5:21 AM, Gregory Stark wrote: >> 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. > Its been a while since the following

Re: [GENERAL] Using xmin to identify last modified rows

2009-02-25 Thread Gregory Stark
Richard Broersma writes: > On Wed, Feb 25, 2009 at 5:21 AM, Gregory Stark wrote: > >> 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. > > > Its been a while since the fol

Re: [GENERAL] Using xmin to identify last modified rows

2009-02-25 Thread Albe Laurenz
Stéphane A. Schildknecht wrote: > Trying to identify last modified (updated or inserted) rows in a table, I > thought I could use xmin. > > I tried is to get some lines sorted by xmin. > > When doing it on a slonified database, I had no problem getting these lines. > > But, trying the same query

Re: [GENERAL] Using xmin to identify last modified rows

2009-02-25 Thread Stéphane A. Schildknecht
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Gregory Stark a écrit : > "Stéphane A. Schildknecht" writes: (...) > > 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 >

Re: [GENERAL] Using xmin to identify last modified rows

2009-02-25 Thread Richard Broersma
On Wed, Feb 25, 2009 at 5:21 AM, Gregory Stark wrote: > 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. Its been a while since the following emails were written. Has the

Re: [GENERAL] Using xmin to identify last modified rows

2009-02-25 Thread Gregory Stark
"Stéphane A. Schildknecht" 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) ins

[GENERAL] Using xmin to identify last modified rows

2009-02-25 Thread Stéphane A. Schildknecht
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, Trying to identify last modified (updated or inserted) rows in a table, I thought I could use xmin. I tried is to get some lines sorted by xmin. When doing it on a slonified database, I had no problem getting these lines. But, trying the same q