Re: [HACKERS] money or dollar type

Поиск
Список
Период
Сортировка
От Jose' Soares Da Silva
Тема Re: [HACKERS] money or dollar type
Дата
Msg-id Pine.LNX.3.96.980511171017.654B-100000@proxy.bazzanese.com
обсуждение исходный текст
Ответ на Re: [HACKERS] money or dollar type  ("Thomas G. Lockhart" <lockhart@alumni.caltech.edu>)
Ответы Re: [HACKERS] money or dollar type  (Bruce Momjian <maillist@candle.pha.pa.us>)
Список 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'


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Re: [PATCHES] Try again: S_LOCK reduced contentionh]
Следующее
От: "Maurice Gittens"
Дата:
Сообщение: Re: [HACKERS] Re: [PATCHES] Try again: S_LOCK reduced contentionh]