From: | Brian Powell Jr <b(dot)powell(dot)jr(at)outlook(dot)com> |
---|---|
To: | "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org>, Dave Cramer <davecramer(at)postgres(dot)rocks>, Erik Wienhold <ewie(at)ewie(dot)name> |
Cc: | David Rowley <dgrowleyml(at)gmail(dot)com>, "pgsql-docs(at)lists(dot)postgresql(dot)org" <pgsql-docs(at)lists(dot)postgresql(dot)org> |
Subject: | RE: Monetary Data Types Improvement |
Date: | 2024-03-22 03:17:38 |
Message-ID: | DS0PR19MB6502721E4F5DC70AD23BBF82AB312@DS0PR19MB6502.namprd19.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
Coming from using SQL Server, money was the easiest way I saw to replicate FORMAT(<value>,'C2') for reporting purposes but then I guess I could have just cast it as money for the report/view. Beyond that, using NUMERIC(<num>,2) works fine.
Brian Powell Jr, EI
-----Original Message-----
From: Jonathan S. Katz <jkatz(at)postgresql(dot)org>
Sent: Thursday, March 21, 2024 3:12 PM
To: Dave Cramer <davecramer(at)postgres(dot)rocks>; Erik Wienhold <ewie(at)ewie(dot)name>
Cc: David Rowley <dgrowleyml(at)gmail(dot)com>; b(dot)powell(dot)jr(at)outlook(dot)com; pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: Monetary Data Types Improvement
On 3/20/24 11:07 AM, Dave Cramer wrote:
>
>
> On Wed, 20 Mar 2024 at 10:59, Erik Wienhold <ewie(at)ewie(dot)name
> <mailto:ewie(at)ewie(dot)name>> wrote:
>
> On 2024-03-18 23:24 +0100, David Rowley wrote:
> > My vote would go to adding a deprecation notice to that section
> of the
> > docs. There's some talk [1] about how we discourage the usage of the
> > money type and that goes on to discuss the possibilities of moving it
> > into a contrib module.
> >
> > My hope would be that deprecation notice would steer most people away
> > from using it and therefore reduce the number of questions about it
> > due to fewer new use cases of it.
> >
> > [1]
> https://www.postgresql.org/message-id/ZXgh74Ykj3iWvXKr@paquier.xyz
>
> <https://www.postgresql.org/message-id/ZXgh74Ykj3iWvXKr@paquier.xyz>
>
> +1
>
> Huh, I didn't know that it used to have a deprecation notice at some
> point. But that note was removed in 8.3:
>
>
> https://www.postgresql.org/message-id/20071009123315.5fb283c1.darcy%40
> druid.net
> <https://www.postgresql.org/message-id/20071009123315.5fb283c1.darcy%4
> 0druid.net>
>
>
> Sadly that was a mistake. Money is not really a useful type.
Here's[1] the latest "let's remove money" discussion (there's allegedly a hackers thread too, but I'm having trouble finding it.
+1 on reinstating the deprecation notice, given it'll be some years
before we can fully remove it (at least based on the discussion).
Thanks,
Jonathan
[1]
https://www.postgresql.org/message-id/flat/18240-c5da758d7dc1ecf0%40postgresql.org
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2024-03-22 17:40:03 | Re: Add minimal C example and SQL registration example for custom table access methods. |
Previous Message | Jonathan S. Katz | 2024-03-21 19:11:44 | Re: Monetary Data Types Improvement |