Implementing rounding rule in plpgsql - Mailing list pgsql-general

From jeff sacksteder
Subject Implementing rounding rule in plpgsql
Date
Msg-id 51c8a7be0511192301q53750c1aj64cae6b10a532ace@mail.gmail.com
Whole thread Raw
Responses Re: Implementing rounding rule in plpgsql
List 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..

pgsql-general by date:

Previous
From: Ben Martin
Date:
Subject: Custom GIST getting ERROR: too many LWLocks taken
Next
From: Leif Jensen
Date:
Subject: Mambo (CMS) & PostgreSQL