Re: Number Conversion Function

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Tino Wildenhain <tino(at)wildenhain(dot)de>
Cc: justin <justin(at)emproshunts(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Tino Wildenhain <tino(at)living-examples(dot)com>, Abdul Rehman <abr_ora(at)yahoo(dot)com>, PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Number Conversion Function
Date: 2009-04-13 19:49:01
Message-ID: b42b73150904131249n7dadc8bbj34c346454ac944a3@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Apr 13, 2009 at 2:40 PM, Tino Wildenhain <tino(at)wildenhain(dot)de> wrote:
> justin wrote:
>>
>>
>> Tom Lane wrote:
>>>
>>> Tino Wildenhain <tino(at)living-examples(dot)com> writes:
>>>
>>>>
>>>> I would not recommend to do this within the database. Thats typical
>>>> a job for your presentation layer.
>>>>
>>>
>>> ... but having said that, I think the "money" datatype has a function
>>> for this.  Whether that's of any use to you I dunno; money is pretty
>>> restrictive about what it can handle.
>>>
>>>                        regards, tom lane
>>>
>>
>> I disagree the database is the wrong place, there are cases it makes
>> sense.
>>
> Which cases would that be?

What if you had several different 'presentation layers' interfacing
with the database? Say, a internal web app, some reporting programs
used by sales, dept, the old delphi program that no one ever bothered
to rewrite, etc. Do you really want to implement the formatting
function in all those places?

as a general rule, the more i do in the database, the easier things
are for me in the long run.

merlin

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Kynn Jones 2009-04-13 20:01:36 'no pg_hba.conf entry for host "[local]", user "postgres", database "postgres"'...
Previous Message Paul Wehr 2009-04-13 19:36:10 BUMP: Using foreign key constraint to eliminate unnecessary joins in view