Re: Content for talk on Postgres Type System at PostgresConf
От | grimy.outshine830@aceecat.org |
---|---|
Тема | Re: Content for talk on Postgres Type System at PostgresConf |
Дата | |
Msg-id | fpec3abn57sz4pnjxgugbveksjrgiuh7g2wvov6kes5khgjo3i@4bs4jq7l3mv5 обсуждение исходный текст |
Ответ на | Re: Content for talk on Postgres Type System at PostgresConf (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Content for talk on Postgres Type System at PostgresConf
Re: Content for talk on Postgres Type System at PostgresConf |
Список | pgsql-general |
On Thu, Feb 29, 2024 at 05:51:11PM -0500, Tom Lane wrote: > >> money is a fixed-point decimal value, the number of decimal > >> places is locale determined. I’m not aware of any particular > >> problems with that > > You forget about the currency symbol dynamic. Like with time zones > > the local session provides the context, not the stored data. > Yeah. The fact that the same stored value might look like 10.00 > euros to one session and 1000 yen to another one is pretty > catastrophic. The other nasty thing about money is that it's an > int64 so it can't represent more than 2^63 pennies (for whatever a > "penny" is). Now, that's still a Frickin Lot Of Money in any > non-hyperinflated currency, but it's the sort of restriction that > banks don't like to hear of. Lame excuse first: I have never used the money type, probably because I overheard a word like "catastrophic" in my early development :-) But, doesn't what Tom says above contradict Adrian's example session? Either the stored value is re-interpreted according to the locale context, or it isn't. IMO it would be *more* catastrophic if it wasn't, as it looks from Adrian's example. -- Ian
В списке pgsql-general по дате отправления: