| From: | grimy(dot)outshine830(at)aceecat(dot)org |
|---|---|
| To: | pgsql-general(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Content for talk on Postgres Type System at PostgresConf |
| Date: | 2024-03-01 19:27:29 |
| Message-ID: | fpec3abn57sz4pnjxgugbveksjrgiuh7g2wvov6kes5khgjo3i@4bs4jq7l3mv5 |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Adrian Klaver | 2024-03-01 20:15:41 | Re: Content for talk on Postgres Type System at PostgresConf |
| Previous Message | Adrian Klaver | 2024-03-01 16:14:48 | Re: Content for talk on Postgres Type System at PostgresConf |