Re: How to round a double8 data type in sql?

From: David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: How to round a double8 data type in sql?
Date: 2015-02-04 16:07:55
Message-ID: 1423066075927-5836737.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Chuck Roberts wrote
> Postgres 8.4

This release is now out of support and is no longer receiving updates.

> How do I use round() in sql on a double8 data type? While in an SQL
> statement, I can use round just fine on a field that is a type of double.
> Ex: Select round(esthours,2) as ehrs from job;
> But a different field has a type of double8 and I get an error when I try
> to use round on it:
>
> select round(acthours,2) as ahrs from job;
>
> The error is: "No function matches the given name and argument types. You
> might need to add explicit type casts."
>
> I searched around on Google but found no help on doing type casts.

Since this is not a native PostgreSQL type you either need to covert it to
one or ask whomever created this type to also create a rounding function for
it.

While they may monitor this list (doubtful) you are better off contacting
them directly.

David J.

--
View this message in context: http://postgresql.nabble.com/How-to-round-a-double8-data-type-in-sql-tp5836730p5836737.html
Sent from the PostgreSQL - novice mailing list archive at Nabble.com.

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2015-02-04 16:28:34 Re: How to round a double8 data type in sql?
Previous Message Chuck Roberts 2015-02-04 15:00:58 How to round a double8 data type in sql?