X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id F40553A427D for ; Thu, 20 Jan 2005 09:51:48 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 64036-08 for ; Thu, 20 Jan 2005 09:51:36 +0000 (GMT) Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by svr1.postgresql.org (Postfix) with ESMTP id 16A3B3A4467 for ; Thu, 20 Jan 2005 09:51:37 +0000 (GMT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.1/8.13.1) with ESMTP id j0K9pHqD006193 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 20 Jan 2005 02:51:19 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.1/8.13.1) with ESMTP id j0K9pHmw037797; Thu, 20 Jan 2005 02:51:17 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.1/8.13.1/Submit) id j0K9pGec037796; Thu, 20 Jan 2005 02:51:16 -0700 (MST) (envelope-from mfuhr) Date: Thu, 20 Jan 2005 02:51:16 -0700 From: Michael Fuhr To: Andrei Bintintan Cc: pgsql-sql@postgresql.org Subject: Re: SQL timestamp to date cast Message-ID: <20050120095116.GA37770@winnie.fuhr.org> References: <006b01c4fecd$6d37c9e0$0b00a8c0@forge> <20050120093331.GA37672@winnie.fuhr.org> <010a01c4fed4$3fba1ca0$0b00a8c0@forge> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <010a01c4fed4$3fba1ca0$0b00a8c0@forge> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.003 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200501/161 X-Sequence-Number: 19949 On Thu, Jan 20, 2005 at 11:41:41AM +0200, Andrei Bintintan wrote: > >Another possibility would be to create a functional index on datetime: > > > >CREATE INDEX user_action_date_idx ON user_action (date(datetime)); > > GREAT!!! I thought it is possible but I didn't knew how to make such > indexes. :)) See the "Indexes on Expressions" section in the "Indexes" chapter of the documentation. -- Michael Fuhr http://www.fuhr.org/~mfuhr/