Received: from localhost (IDENT:root@hectic-1.jpl.nasa.gov [128.149.68.203]) by hub.org (8.9.2/8.9.1) with ESMTP id BAA93193; Tue, 30 Mar 1999 01:12:54 -0500 (EST) (envelope-from lockhart@alumni.caltech.edu) Received: from alumni.caltech.edu (lockhart@localhost [127.0.0.1]) by localhost (8.8.7/8.8.7) with ESMTP id GAA15644; Tue, 30 Mar 1999 06:14:13 GMT Sender: lockhart@hub.org Message-ID: <37006BB5.E5720D9@alumni.caltech.edu> Date: Tue, 30 Mar 1999 06:14:13 +0000 From: Thomas Lockhart X-Mailer: Mozilla 4.51 [en] (X11; I; Linux 2.0.36 i686) X-Accept-Language: en MIME-Version: 1.0 To: Tom Lane CC: "Jackson, DeJuan" , Andrew Merrill , pgsql-sql@hub.org, PGSQL Hackers Subject: Re: [SQL] indexing a datetime by date References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit > Your index creation syntax is good but there's a bug in function > indexes which require you to specify the ops. Try: > create index when_ndx3 on notes (date(when) date_ops); > Which won't work because the date(datetime) function isn't trusted. > You can change this yourself in the system tables or you can use > PL/PGSQL (the only trustable PL in PostgreSQL that I've found) to > create another conversion function and use it instead. Or you can as > Thomas Lockhart (or is it Tom Lane) if he'd create a trusted function > for the conversions in 6.5. Tom, does this ring a bell with you? istm that (almost) all builtin functions should be trusted, but I haven't done anything explicit about it that I can remember. In your new role as System Table Berserker, perhaps you would want to fix this? :) - Tom