timestamps

Поиск
Список
Период
Сортировка
От Martin Atukunda
Тема timestamps
Дата
Msg-id 200412141239.44301.matlads@myrealbox.com
обсуждение исходный текст
Ответы Re: [despammed] timestamps  (Andreas Kretschmer <akretschmer@despammed.com>)
Re: timestamps  (Steven Klassen <sklassen@commandprompt.com>)
Список pgsql-novice
I'm trying to implement a daemon that gets its data from postgresql.

The user uses a web interface to store the time that the daemon should begin
operations in a table called translog.

The schema for translog is as follows:

CREATE TABLE translog (
 id serial,
 action integer,
 sdate varchar(16) NOT NULL,
 stime varchar(16) NOT NULL
);

 id | action |   sdate    |  stime
----+--------+------------+----------
  3 |      1 | 2004/12/10 | 12:30:00
  4 |      1 | 2004/12/10 | 12:20:00
  5 |      1 | 2004/12/13 | 12:30:00
  6 |      1 | 2004/12/13 | 12:30:30
(4 rows)

The daemon hits the database every minute and I would like it to get all the
rows whose stime is between now  and one minute ago.

How do I select all the rows that have an stime between now and one minute
ago?

- Martin -

В списке pgsql-novice по дате отправления:

Предыдущее
От: "Deepa K"
Дата:
Сообщение: Changing debug levels in postgresql
Следующее
От: Andreas Kretschmer
Дата:
Сообщение: Re: [despammed] timestamps