Re: [SQL] Date Index

2012-11-05 Thread Tom Lane
Adam Tauno Williams 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 tim

Re: [SQL] Date Index

2012-11-05 Thread Adam Tauno Williams
On Fri, 2008-10-31 at 08:48 +0100, A. Kretschmer wrote: > am Thu, dem 30.10.2008, um 14:49:16 -0600 mailte Ryan Hansen folgendes: > > Hey all, > > I?m apparently too lazy to figure this out on my own so maybe one of you can > > just make it easy on me. J > > I want to index a timestamp field but

Re: [SQL] Date Index

2008-11-03 Thread Tom Lane
"Ryan Hansen" <[EMAIL PROTECTED]> 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

Re: [SQL] Date Index

2008-11-03 Thread Ryan Hansen
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of A. Kretschmer Sent: Friday, October 31, 2008 1:49 AM To: pgsql-sql@postgresql.org Subject: Re: [SQL] Date Index am Thu, dem 30.10.2008, um 14:49:16 -0600 mailte Ryan Hansen folgendes: > Hey all, > > >

Re: [SQL] Date Index

2008-10-31 Thread A. Kretschmer
am Thu, dem 30.10.2008, um 14:49:16 -0600 mailte Ryan Hansen folgendes: > Hey all, > > > > I?m apparently too lazy to figure this out on my own so maybe one of you can > just make it easy on me. J > > > > I want to index a timestamp field but I only want the index to include the > -mm

Re: [SQL] Date Index

2008-10-30 Thread Scott Marlowe
On Thu, Oct 30, 2008 at 2:49 PM, Ryan Hansen <[EMAIL PROTECTED]> wrote: > Hey all, > > > > I'm apparently too lazy to figure this out on my own so maybe one of you can > just make it easy on me. J > > > > I want to index a timestamp field but I only want the index to include the > -mm-dd portio

[SQL] Date Index

2008-10-30 Thread Ryan Hansen
Hey all, I'm apparently too lazy to figure this out on my own so maybe one of you can just make it easy on me. J I want to index a timestamp field but I only want the index to include the -mm-dd portion of the date, not the time. I figure this would be where the "expression" portion