Re: Create Index on Date portion of timestamp

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Niederland" <niederland(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Create Index on Date portion of timestamp
Date: 2006-10-13 20:39:55
Message-ID: 22130.1160771995@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Niederland" <niederland(at)gmail(dot)com> writes:
> I am using postgresql 8.1.4.
> Is there anyway to create an index equivalent to:
> CREATE INDEX i1 ON t1 USING btree (ts::Date);

You're short some parentheses:

CREATE INDEX i1 ON t1 USING btree ((ts::Date));

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message A. Kretschmer 2006-10-13 20:50:01 Re: Create Index on Date portion of timestamp
Previous Message Tom Lane 2006-10-13 20:39:04 Re: more anti-postgresql FUD