Re: pg_dumpall problems - Mailing list pgsql-general

From Stephan Szabo
Subject Re: pg_dumpall problems
Date
Msg-id Pine.BSF.4.10.10008151433140.87810-100000@megazone23.bigpanda.com
Whole thread Raw
In response to pg_dumpall problems  (g <brian@wuwei.govshops.com>)
Responses Re: pg_dumpall problems  (g <brian@wuwei.govshops.com>)
List pgsql-general
I believe the standard way is
CAST(1.1 as numeric)

But the following should also work:
1.1::numeric

Stephan Szabo
sszabo@bigpanda.com

On Tue, 15 Aug 2000, g wrote:

> I need to know how to cast types. Here's my basic problem:
> I'm trying to:
>
> update products set list_price = gsa_price * 1.1 where list_price =
> gsa_price;
>
> The error I get back is:
>
> ERROR:  Unable to identify an operator '*' for types 'numeric' and
> 'float8' You will have to retype this query using an explicit cast
>
> So, I'm assuming that I need to cast the value 1.1 as a numeric so that I
> will be multiplying a numeric times a numeric.
>
> Then I realized I had no idea what the syntax to do the cast was.


pgsql-general by date:

Previous
From: Armando "Racchumí" Piscoya
Date:
Subject: Error with PostgreSQL - IMP
Next
From: Stephan Szabo
Date:
Subject: Re: bytea question