From: | Gaetano Mendola <mendola(at)bigfoot(dot)com> |
---|---|
To: | "pgsql-general(at)postgresql(dot)org"(at)svr1(dot)postgresql(dot)org |
Cc: | Stephane Charette <charette(at)writeme(dot)com> |
Subject: | Re: CREATE INDEX question (how to index on "money" field?) |
Date: | 2003-10-12 20:26:41 |
Message-ID: | 3F89B901.8020307@bigfoot.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2003-10-12 20:30:45 | Re: go for a script! / ex: PostgreSQL vs. MySQL |
Previous Message | Hannu Krosing | 2003-10-12 19:39:25 | Re: Index/Foreign Key Question |