Re: age

From: "Sam Liddicott" <sam(dot)liddicott(at)ananova(dot)com>
To: "mixo" <mixo(at)beth(dot)uniforum(dot)org(dot)za>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: age
Date: 2002-07-16 10:18:03
Message-ID: D38A0FCD5830E848992DF2D4AF5F6F4F96ADDA@conwy.leeds.ananova.internal
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> -----Original Message-----
> From: mixo [mailto:mixo(at)beth(dot)uniforum(dot)org(dot)za]
> Sent: 16 July 2002 11:12
> To: pgsql-general(at)postgresql(dot)org
> Subject: [GENERAL] age
>
>
>
> I lock rows based on 2 columns, "status" and "locktime". The
> idea is: if
> the locktime has older than some age ( e.g. 1 minute), then
> the "status" bit
> can be ignore, i.e. the lock expires. The problem I have is: if the
> "locktime"
> is "NULL" (this set when the lock is removed), then I can't
> get the age.
> Is there a way to find the age of a column whose value can be
> or is "NULL"?

Yeah, have another column for storing the age, or have another column to
store whether or not it is locked and don't use NULL in locktime.

You can't retreive data that you aren't storing.

Sam

Responses

  • Re: age at 2002-07-16 12:41:07 from mixo

Browse pgsql-general by date

  From Date Subject
Next Message Bruno Wolff III 2002-07-16 11:32:35 Re: Question: merit / feasibility of compressing frontend
Previous Message mixo 2002-07-16 10:11:45 age