casting float8 type - Mailing list pgsql-general

From Bob Dusek
Subject casting float8 type
Date
Msg-id 36411F55.B878809E@palaver.net
Whole thread Raw
Responses Re: [GENERAL] casting float8 type  (Ulf Mehlig <umehlig@uni-bremen.de>)
List pgsql-general
Hello everyone,

I apologize if this seems elementary to you, but I just spent quite a
bit of time searching the archives and the documentation for a way to do
this.  I may have been looking wrong, but I tried to look in all of the
"obvious" places. Anyway...

How would I go about converting a value of type 'float8' to a value of
type 'int'?  It's probably not possible to do a straight conversion of a
float to an int, but is there a truncate, or a rounding function that I
could use?  I couldn't find such a thing in my search.

Thanks in advance,

Bob

pgsql-general by date:

Previous
From: The Hermit Hacker
Date:
Subject: November 4th, 1998: PostgreSQL v6.4 Released
Next
From: Constantin Teodorescu
Date:
Subject: Rules aren't saved by pg_dump !!!