On 1/8/13, Gavan Schneider <pg-gts(at)snkmail(dot)com> wrote:
> 2. SELECT ... WHERE
> '2011-01-01'::TIMESTAMP <= col_of_type_timestamp
> AND col_of_type_timestamp <=
> '2011-12-31'::TIMESTAMP;
This won't quite work, because '2011-12-31'::TIMESTAMP
is the same as 2011-12-31 00:00:00.00000
so records timestamped later in the day on the 31st would not get selected
SELECT ... WHERE
'2011-01-01'::TIMESTAMP <= col_of_type_timestamp
AND col_of_type_timestamp < '2012-01:01'::TIMESTAMP;
would get all records with a 2011 timestamp.
--
Mike Nolan