using possibly null timestamptz columns - Mailing list pgsql-sql

From James Cloos
Subject using possibly null timestamptz columns
Date
Msg-id m3a8eqx4rx.fsf@carbon.jhcloos.org
Whole thread Raw
Responses Re: using possibly null timestamptz columns
List 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 by date:

Previous
From: Michael Moore
Date:
Subject: Re: cvs text to quoted cvs text
Next
From: Tom Lane
Date:
Subject: Re: using possibly null timestamptz columns