Re: date range query help

Поиск
Список
Период
Сортировка
От Sam Mason
Тема Re: date range query help
Дата
Msg-id 20081120114916.GJ2459@frubble.xen.chris-lamb.co.uk
обсуждение исходный текст
Ответ на date range query help  (novice <user.postgresql@gmail.com>)
Ответы Re: date range query help  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Thu, Nov 20, 2008 at 01:10:41PM +1100, novice wrote:
> select * from mobile_custodian;
>
>  custodian_id | user_id | issue_date | return_date |  mobile_no
> --------------+---------+------------+-------------+-------------
>             4 |     Ben | 2008-10-11 | 2008-10-13  | 09455225998
>             5 |    Josh | 2008-10-15 |             | 09455225998

I sometimes find it easier to store ranges like this with having the
open ends at infinity.  This is easier with timestamps as they have
magic 'infinity' values in PG (both positive and negative).  Values of
date type don't have any special values like this which makes things a
bit more awkward.

I haven't seen it posted to the list for a while; but there's a nice
old book titled "Developing Time Oriented Database Applications in SQL"
that's now out of print but is available as a PDF.

  http://www.cs.arizona.edu/~rts/tdbbook.pdf


  Sam

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

Предыдущее
От: Marcus Engene
Дата:
Сообщение: Re: where in (select array)
Следующее
От: WireSpot
Дата:
Сообщение: join with redundant results VS simpler join plus multiple selects