Re: querying the age of a row

From: brian <brian(at)zijn-digital(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: querying the age of a row
Date: 2007-06-07 18:42:06
Message-ID: 4668517E.9060503@zijn-digital.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Lonni J Friedman wrote:
> Unfortunately, its too late now. The database (and its tables) have
> been around for a while, so even if I added this column, it wouldn't
> help me for the thousands of pre-existing rows. Thanks though.
>

Please don't top-post.

Assuming that the majority of the pre-existing rows are more than 24
hours old, there probably wouldn't be any harm in altering the table
with the new column and assigning all present rows the timestamp for the
moment you do this. Then just wait at least 24 hours before doing
whatever it is you wish to do.

Not perfect, but it doesn't seem like it would be a problem.

brian

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Robert Fitzpatrick 2007-06-07 18:46:46 Generate random password
Previous Message Michael Glaesemann 2007-06-07 18:22:05 Re: subtract a day from the NOW function