Re: [Pgsql-ayuda] Problema en función al usar "timestamp + interval '$1 seconds' "

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Sebastián Villalba <sebastian(at)fcm(dot)unc(dot)edu(dot)ar>
Cc: Lista Postgres <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>
Subject: Re: [Pgsql-ayuda] Problema en función al usar "timestamp + interval '$1 seconds' "
Date: 2003-10-22 23:28:44
Message-ID: 20031022232844.GA13730@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

On Tue, Oct 21, 2003 at 10:36:51AM -0300, Sebastián Villalba wrote:

> create or replace function checktimeout(char, integer) returns integer as '
> update conexiones
> set sessionFinish = now()
> where sessionId like $1
> and sessionLastAction + interval '$2 seconds' < now();

and sessionLastAction + $2 * '1 second'::interval < now();

> select 1;
> ' language sql;

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
Hi! I'm a .signature virus!
cp me into your .signature file to help me spread!

In response to

Responses

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Alvaro Herrera 2003-10-22 23:41:33 Re: [Pgsql-ayuda] borrar columna
Previous Message Alvaro Herrera 2003-10-22 22:36:22 Re: [Pgsql-ayuda] update where exists( ......)