Re: [HACKERS] money or dollar type

From: "Jose' Soares Da Silva" <sferac(at)bo(dot)nettuno(dot)it>
To: "Thomas G(dot) Lockhart" <lockhart(at)alumni(dot)caltech(dot)edu>
Cc: hackers postgres <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] money or dollar type
Date: 1998-05-11 17:24:10
Message-ID: Pine.LNX.3.96.980511171017.654B-100000@proxy.bazzanese.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 11 May 1998, Thomas G. Lockhart wrote:

> > I think that PostgreSQL money type should be very useful if we could
> > remove the dollar sign. We can't use it with Lira/Peseta/Mark etc.
> > In europe now we have Euro. If we remove the $ it will be useful
> > otherwise we have to rename it to 'dollar'. ;-)
>
> Have you tried compiling with "USE_LOCALE" turned on and with the right
> setting for LC_xxx? The code is supposed to use local conventions, but I
> don't know if it works in the way you want. I agree that it should...
Thanks Tom, I will try it.
>
> > PS: Is there a reason to left justify it ?
>
> That is just an artifact of the column formatting; all columns are left
> justified in psql afaik.
^^^^^
Sorry Tom, I can't find the word 'afaik' on my dictionary.

Any way, seems that psql justify numbers to the right and text to the left,
money is numeric then I expect that psql justify it to the right.
It has also a little problem justifying varchars, look:

prova=> select var as my_varchar from prova where var = '12';
my_varchar
----------
12 <--right justified
(1 row)

prova=> select var as my_varchar from prova;
my_varchar
----------
12 <--left justified, this time ???
a12
a12
(3 rows)
Jose'

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jose' Soares Da Silva 1998-05-11 17:38:33 Re: [QUESTIONS] money or dollar type
Previous Message Tom Lane 1998-05-11 17:20:04 Re: [HACKERS] Maybe a Vacuum bug in 6.3.2