Skip site navigation (1) Skip section navigation (2)

Recasting data type

From: Conrad Schuler <conrad(dot)schuler(at)masks(dot)org>
To: postgreSQL <pgsql-novice(at)postgresql(dot)org>
Subject: Recasting data type
Date: 2001-02-07 19:32:05
Message-ID: l03130300b6a74ff52d35@[] (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
Hi All,

Thanks for the help on the 'lumper' vs. 'splitter' question.

I asked my practice database:

select count (*) from titles where price > 20

It responded:

PostgreSQL said: ERROR: Unable to identify an operator '>' for types
'money' and 'int4' You will have to retype this query using an explicit cast

I tried variations on this theme and got nowhere:
select count (*) from titles cast(price as float8) where price > 20




Stay informed about the latest changes at,
sign up for the eNewsletter at:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ survives on your donations.
Please help by mailing a tax-deductible donation to:
P.O. Box 12089
Olympia WA 98508

Our website is at:


pgsql-novice by date

Next:From: Francisco ReyesDate: 2001-02-07 19:44:59
Subject: Re: Re: RE: Sizing of LARGE databases.
Previous:From: Einar KarttunenDate: 2001-02-07 13:03:13
Subject: Re: RE: Sizing of LARGE databases.

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group