Re: dividing money by money

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Cc: "Andy Balholm" <andy@balholm.com>, pgsql-hackers@postgresql.org, Peter Eisentraut <peter_e@gmx.net>
Date: 2010-07-16T16:21:13Z
Lists: pgsql-hackers
"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> The only way I'd be willing to label those things immutable was if
>> we did something to lock down lc_monetary for the life of a
>> database (ie, make it work more like lc_collate does now).  Which
>> might be a good idea, but it's not how it works today.
 
> Interesting.  In general, what is involved in locking something like
> this down for the life of a database?

IIRC, the main pain point is providing an option for CREATE DATABASE
to set the value.  If you chase down all the references to lc_collate
you'll get the picture.

It'd probably be worth doing if money were less deprecated, but right
now I can't get excited about it.

Actually ... the thing that might turn money into a less deprecated type
is if you could set lc_monetary per column.  I wonder whether Peter's
collation hack could be extended to deal with that.

			regards, tom lane