Re: index compatible date_trunc in postgres?

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: index compatible date_trunc in postgres?
Дата
Msg-id 20081219130628.GD4278@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: index compatible date_trunc in postgres?  ("Scott Marlowe" <scott.marlowe@gmail.com>)
Список pgsql-sql
Scott Marlowe escribió:
> On Thu, Dec 18, 2008 at 10:46 PM, Bryce Nesbitt <bryce2@obviously.com> 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"
Дата:
Сообщение: Re: index compatible date_trunc in postgres?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: index compatible date_trunc in postgres?