"Ryan Hansen" <ryan.hansen@brightbuilders.com> writes:
> Incidentally, extract(date from ts) doesn't work on my install of 8.3
The field names recognized by extract() are quite well documented
http://www.postgresql.org/docs/8.3/static/functions-datetime.html#FUNCTIONS-DATETIME-EXTRACT
and "date" isn't one of them.
What you probably want is just to cast the timestamp to date:cast(ts as date) -- SQL standard syntaxts::date
--traditional Postgres abbreviation
regards, tom lane