Andras Balogh wrote:
> So i am looking a date type that would allow me to do the following with one
> (or a few) query
> (and to be fast too):
> -select all records for a given month
> -select the count of records where the hour is 14.
> -select all the records from the 7th week.
> -select count of records where the day of the week is Sunday.
How about you write your queries like:
date >= '01/4/2000' and date < '01/5/2000'
or equivalent. It allows use of the index but works the same.
Except for the day is Sunday though...
Martijn van Oosterhout <kleptog(at)cupid(dot)suninternet(dot)com>
In response to
- pgsql DATE at 2000-04-26 11:49:39 from Andras Balogh
pgsql-general by date
|Next:||From: Dale Anderson||Date: 2000-04-26 15:01:33|
|Subject: RE: unique row identifier data type exhausted . . .|
|Previous:||From: Justin Banks||Date: 2000-04-26 14:28:17|
|Subject: Re: plpgsql FOR <select> LOOP question|