Adam  Tauno Williams <awill...@whitemice.org> writes:
> OGo=> create index job_date_only on job(extract(date from start_date at
> time zone 'utc'));
> ERROR:  timestamp units "date" not recognized

There's no field called "date" in a timestamp.  I think what you're
trying to achieve is "date_trunc('day', start_date at time zone 'utc')"

http://www.postgresql.org/docs/9.2/static/functions-datetime.html#FUNCTIONS-DATETIME-EXTRACT

                        regards, tom lane


-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql

Reply via email to