Re: [SQL] indexing a datetime by date
Thomas Lockhart <lockhart@alumni.caltech.edu>
From: Thomas Lockhart <lockhart@alumni.caltech.edu>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: "Jackson, DeJuan" <djackson@cpsgroup.com>, Andrew Merrill <andrew@compclass.com>, pgsql-sql@hub.org, PGSQL Hackers <pgsql-hackers@hub.org>
Date: 1999-03-30T06:14:13Z
Lists: pgsql-hackers
> 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