using possibly null timestamptz columns

Поиск
Список
Период
Сортировка
От James Cloos
Тема using possibly null timestamptz columns
Дата
Msg-id m3a8eqx4rx.fsf@carbon.jhcloos.org
обсуждение исходный текст
Ответы Re: using possibly null timestamptz columns  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
Given a table with a pair of timestamptz columns (lets call them s and e)
which are typically null, is there a better way to write this where clause
snippet:
   where ( s is null or s <= now() ) and ( e is null or e >= now() )

In particular I hope to ensure efficient indexes.

-JimC
-- 
James Cloos <cloos@jhcloos.com>         OpenPGP: 0x997A9F17ED7DAEA6



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

Предыдущее
От: Michael Moore
Дата:
Сообщение: Re: cvs text to quoted cvs text
Следующее
От: Tom Lane
Дата:
Сообщение: Re: using possibly null timestamptz columns