Re: index compatible date_trunc in postgres?

Поиск
Список
Период
Сортировка
Искать
От
Alvaro Herrera
Тема
Re: index compatible date_trunc in postgres?
Дата
Msg-id
20081219130628.GD4278@alvh.no-ip.org
Ответ на
Список
Дерево обсуждения
index compatible date_trunc in postgres? Bryce Nesbitt <bryce2@obviously.com>
Re: index compatible date_trunc in postgres? Tom Lane <tgl@sss.pgh.pa.us>
Re: index compatible date_trunc in postgres? Bryce Nesbitt <bryce2@obviously.com>
Re: index compatible date_trunc in postgres? "Scott Marlowe" <scott.marlowe@gmail.com>
Downgrade database and problem with sequences "Sebastian Rychter" <srychter@anvet.com.ar>
Re: Downgrade database and problem with sequences Tom Lane <tgl@sss.pgh.pa.us>
Re: index compatible date_trunc in postgres? Alvaro Herrera <alvherre@commandprompt.com>
Scott Marlowe escribió:
> On Thu, Dec 18, 2008 at 10:46 PM, Bryce Nesbitt  wrote:
> > I've got a legacy app that does 8.3 incompatible date searches like so:
> > explain select count(*) from contexts where publication_date like '2006%';
> > explain select count(*) from contexts where publication_date like
> > '2006-09%';

> You can create an index on date_trunc (on timestamp without timezone,
> but not on timestamp with timezone since it's not immutable)

But you can create an index on the timestamptz AT TIME ZONE 'GMT', I
think.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

В списке pgsql-sql по дате отправления
От: Scott Marlowe
Дата:
От: Tom Lane
Дата:
FAQ