Re: CREATE INDEX question (how to index on "money" field?)

Поиск
Список
Период
Сортировка
От Gaetano Mendola
Тема Re: CREATE INDEX question (how to index on "money" field?)
Дата
Msg-id 3F89B901.8020307@bigfoot.com
обсуждение исходный текст
Список pgsql-general
Stephane Charette wrote:

> QUICK VERSION:  How do I create an index on a field of type "MONEY"?
>
> -----------------------------
> LONG VERSION:
>
> I have a table with a field of type "money".  I very often need to
> access records by the purchase price so I thought I'd create an index
> to help out my selects:
>
>    CREATE INDEX purchasepriceidx ON mytable (purchaseprice);

It's working on 7.4:

Welcome to psql 7.4beta3, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
        \h for help with SQL commands
        \? for help on internal slash commands
        \g or terminate with semicolon to execute query
        \q to quit

kalman=# create table test( a money );
CREATE TABLE
kalman=# create index idx on test (a );
CREATE INDEX





Regards
Gaetano Mendola


















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

Предыдущее
От: Ron Johnson
Дата:
Сообщение: Re: [PERFORM] go for a script! / ex: PostgreSQL vs. MySQL
Следующее
От: Martin Marques
Дата:
Сообщение: Re: need for concrete info