Received: from news.tht.net (news.hub.org [216.126.91.242]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g08BvfB43912 for ; Tue, 8 Jan 2002 06:57:46 -0500 (EST) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.11.4/8.11.4) id g08BuQk55427 for pgsql-sql@postgresql.org; Tue, 8 Jan 2002 06:56:26 -0500 (EST) (envelope-from news) From: CoL X-Newsgroups: comp.databases.postgresql.sql Subject: Re: Error trying to create a functional index. Date: Tue, 08 Jan 2002 12:57:27 +0100 Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 24 Message-ID: <3C3ADEA7.9090303@mportal.hu> References: <3C397FF1.20706@mportal.hu> <3C3AD7A0.9090304@dev.null> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: news@hub.org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.7+) Gecko/20020106 X-Accept-Language: en-us To: pgsql-sql@postgresql.org X-Archive-Number: 200201/133 X-Sequence-Number: 6221 Hi, Jochem van Dieten wrote: > CoL wrote: > >> Steve: of course you can make functional indices: >> >> So why this not workin???? (not workin for me 2 too, pg 7.1.3) >> "CREATE INDEX eventdateindex ON event (date_trunc('day', eventstamp));" >> > > Wouldn't your problem be that 'day' is a constant? > Jochem sure it is, but date_trunc takes this, so what is the way to create a date_trunc part or any date function index on a timestamp? Or it's not possible? CoL