Implementing rounding rule in plpgsql

From: jeff sacksteder <jsacksteder(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Implementing rounding rule in plpgsql
Date: 2005-11-20 07:01:02
Message-ID: 51c8a7be0511192301q53750c1aj64cae6b10a532ace@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Due to application requirements, I need to implement a rounding function
that is independant of the baked-in rounding functionality. I'd prefer to do
it in plpgsql for maximum portability.
To do this, I'll need to sequentially walk through the digits of an
arbritarily long floating-point number. I can't think of a good way to do
this.

I would greatly appreciate pointers to similar example code or discussion of
the method for doing this..

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Leif Jensen 2005-11-20 08:02:30 Mambo (CMS) & PostgreSQL
Previous Message Ben Martin 2005-11-20 05:02:36 Custom GIST getting ERROR: too many LWLocks taken