Re: [SQL] indexing a datetime by date

From: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Jackson, DeJuan" <djackson(at)cpsgroup(dot)com>, Andrew Merrill <andrew(at)compclass(dot)com>, pgsql-sql(at)hub(dot)org, PGSQL Hackers <pgsql-hackers(at)hub(dot)org>
Subject: Re: [SQL] indexing a datetime by date
Date: 1999-03-30 06:14:13
Message-ID: 37006BB5.E5720D9@alumni.caltech.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-sql

> 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Wieck 1999-03-30 08:01:17 Re: [HACKERS] select * from pg_veiw; errors in 6.5 and 6.4.2
Previous Message Thomas Lockhart 1999-03-30 06:09:40 Re: [HACKERS] vacuum updated...

Browse pgsql-sql by date

  From Date Subject
Next Message Herouth Maoz 1999-03-30 11:51:16 Re: [GENERAL] Returning an integer from a date
Previous Message Jackson, DeJuan 1999-03-30 04:07:20 RE: [SQL] indexing a datetime by date