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