Re: type money causes unrestorable dump
От | Gregory Stark |
---|---|
Тема | Re: type money causes unrestorable dump |
Дата | |
Msg-id | 87d4voceij.fsf@oxford.xeocode.com обсуждение исходный текст |
Ответ на | Re: type money causes unrestorable dump ("D'Arcy J.M. Cain" <darcy@druid.net>) |
Ответы |
Re: type money causes unrestorable dump
|
Список | pgsql-hackers |
"D'Arcy J.M. Cain" <darcy@druid.net> writes: > That said, I wonder if there is another answer to this question. > Perhaps the functions in cash.c can be pulled out and made into > external functions that can be fed an int (long) and output the desired > format. That way we could use the existing int or long type but > convert manually on I/O. Let people choose whether they want the > simplification of the money type or the standardization allowed by just > using the functions. Long term I liked the idea from a few years ago of having a "default format" which would be attached to a column just like a default collation can be attached. Then you can declare your currency columns as regular integers but mark them as being formatted as currency by default. pg_dump would presumably explicitly override the default and format the integers as plain integers and restore the default format string as part of its DDL. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления: