| From: | "Stéphane A(dot) Schildknecht" <stephane(dot)schildknecht(at)postgresqlfr(dot)org> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Using xmin to identify last modified rows |
| Date: | 2009-02-25 15:07:22 |
| Message-ID: | 49A55EAA.8040001@postgresqlfr.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Gregory Stark a écrit :
> "Stéphane A. Schildknecht" <stephane(dot)schildknecht(at)postgresqlfr(dot)org> 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
> 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,
Thanks for the answer.
A timestamp would surely be a better idea. BTW, I don't have hand on the schema
yet and was just looking for a quick way to get some last modified rows.
Regards,
- --
Stéphane Schildknecht
PostgreSQLFr - http://www.postgresql.fr
Dalibo - http://www.dalibo.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFJpV6qA+REPKWGI0ERAhq/AJwNt845SDujYmFhe4aTqI30QBBC9gCg4vcH
edlSZti3KDtozJ82Od0nErQ=
=z1lm
-----END PGP SIGNATURE-----
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ashish Karalkar | 2009-02-25 15:15:49 | Re: Restore DB |
| Previous Message | Thom Brown | 2009-02-25 13:54:25 | Re: Warm standby failover mechanism |