Re: [SQL] indexing a datetime by date

Поиск
Список
Период
Сортировка
От Thomas Lockhart
Тема Re: [SQL] indexing a datetime by date
Дата
Msg-id 37006BB5.E5720D9@alumni.caltech.edu
обсуждение исходный текст
Ответ на RE: [SQL] indexing a datetime by date  ("Jackson, DeJuan" <djackson@cpsgroup.com>)
Ответы Re: [SQL] indexing a datetime by date  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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


В списке pgsql-sql по дате отправления:

Предыдущее
От: "Jackson, DeJuan"
Дата:
Сообщение: RE: [SQL] indexing a datetime by date
Следующее
От: Herouth Maoz
Дата:
Сообщение: Re: [GENERAL] Returning an integer from a date