Re: Turn off "money" formatting?
От | Brendan Jurd |
---|---|
Тема | Re: Turn off "money" formatting? |
Дата | |
Msg-id | 40C3A2B1.6040903@blakjak.sytes.net обсуждение исходный текст |
Ответ на | Turn off "money" formatting? (jerry.levan@eku.edu (Jerry)) |
Список | pgsql-general |
If you need to be able to cast money to numeric, you can just write your own cast. This is one of the things about postgres that I dearly love. You could probably even write the cast function in SQL using regular expressions. Then, you just write a query with an explicit cast, e.g. SELECT foo :: numeric FROM bar; I noticed in the docs that the money type is actually deprecated, so you probably want to consider converting your column to the numeric type regardless. BJ Jerry wrote: >Is it possible to turn off the "$" and "," that appear in "money" formatted >columns so I can dump the table in a numeric format? > >The man page hints that lc_monetary controls the formatting but I >cannot find any clues on what to do... > >Apparently money cannot be cast to anything. > >I don't think it will be hard to write a custom tcl/perl >script that takes a "copy checks to...." command to do the task >but I would like a cleaner solution.... > > >Jerry > >---------------------------(end of broadcast)--------------------------- >TIP 8: explain analyze is your friend > >
В списке pgsql-general по дате отправления: