That says in 8.2 docs [1]. But I'm not sure why that notice doesn't
appear in the 8.3 docs [2] .
[1] http://www.postgresql.org/docs/8.2/static/datatype-money.html
[2] http://www.postgresql.org/docs/8.3/static/datatype-money.html
I use the money type a formatting step in select statements when
displaying data on the client only. It saves me setting up input mask
and what not on client side.
There are draw backs to using the money type
dumps/restores can go wrong
many frameworks convert money data type back to numeric or cast it
to String type
I would never have and never will use money as a data type in tables as
the precision is fixed to 2
--
Sent via pgsql-general mailing list (pgsql-...@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
I think it was undeprecated in 8.3 because someone (D'Arcy J.M. Cain?)
made a bunch of changes to the datatype to make it more
currency-portable. Have a look in the release notes.
A
--
Andrew Sullivan
a...@commandprompt.com
+1 503 667 4564 x104
http://www.commandprompt.com/
On Mon, May 26, 2008 at 03:46:39PM -0400, Justin wrote:Thats a good Question is the Money type ever going to die i believe it was deprecated several versions ago?I think it was undeprecated in 8.3 because someone (D'Arcy J.M. Cain?) made a bunch of changes to the datatype to make it more currency-portable. Have a look in the release notes. A
Widen the MONEY data type to 64 bits (D'Arcy Cain)
This greatly increases the range of supported MONEY values.
> Is there somewhere else i'm suppose to look? I'm glade its been saved.
> it could use more improvements like ability to
> 1.change precision,
> 2.change output format.
I think if you want those improvements, you'll need to convince some
people on -hackers.
Your summary is pretty much correct. The 'deprecated' moniker was for
all intents and purposes removed when the range was expanded. For the
record, I don't agree with this...IMO the money type is not really
rigorous enough to be useful. It's missing tons of basic casts and is
just plain weird. OTOH, it's a neat example of a fixed precision
integer type.
I personally think that it really belongs in contrib as an example of
adding a new type...with all the money bits stripped off, as a
strictly fixed precision integer.
merlin
So? Tagged types has a currency type. As long as you provide a way to
extract which currency is meant, people can join on conversion tables.
Now that I think of it, enum's have the necessary machinary already to
map OIDs to strings so you're nearly all the way there... (Except
ofcourse taggedtypes didn't prevent you from adding more currencies
later, which enums don't currently allow you to do).
Have a nice day,
--
Martijn van Oosterhout <kle...@svana.org> http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.