pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Francis Solomon <francis@stellison.co.uk>
To: Boris <koester@x-itec.de>
To: pgsql-sql@postgresql.org
Subject: RE: Date/Time problem -(((
Date: Tue, 2 Jan 2001 11:23:49 -0000
Message-ID: <NEBBIFFPELJMCJAODNPKAEHCCEAA.francis@stellison.co.uk> (raw)
In-Reply-To: <7225221807.20001230013625@x-itec.de>

Hi Boris,

I know Kaare Rasmussen posted a URL to the online documentation already,
but this might be a direct solution to your problem:

DELETE FROM onlineuser WHERE datum < ('now'::datetime - '5
minutes'::interval);

Hope this helps

Francis Solomon

> Hello
>
> I am moving from MySQL to Postgres and while converting my sql code I
> have a lot of problems with this construction:
>
> ($ze is current time - 300 secounds):
>
> delete from onlineuser where datum < FROM_UNIXTIME($ze)
>
> Is there any Date/Time function in PGSQL? I want as shown in this
> example delete entries older than 300 secounds.
>
> I postet to the list because I have found no solution in the
> tutorials and search-engine (maybe searched with wrong words?)
>
> It would be great if someone could help me / point me to the right
> way...
>
> --
> Boris




view thread (3+ messages)

Message-ID: <NEBBIFFPELJMCJAODNPKAEHCCEAA.francis@stellison.co.uk>
Permalink:  ../NEBBIFFPELJMCJAODNPKAEHCCEAA.francis@stellison.co.uk/
Also on:    postgresql.org/message-id/NEBBIFFPELJMCJAODNPKAEHCCEAA.francis@stellison.co.uk

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: francis@stellison.co.uk, koester@x-itec.de
  Subject: Re: Date/Time problem -(((
  In-Reply-To: <NEBBIFFPELJMCJAODNPKAEHCCEAA.francis@stellison.co.uk>
  References: <7225221807.20001230013625@x-itec.de> <NEBBIFFPELJMCJAODNPKAEHCCEAA.francis@stellison.co.uk>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox