https://www.postgresql.org/docs/9.1/datatype-money.html
The money type stores a currency amount with a fixed fractional precision; see Table 8-3. The fractional precision is determined by the database's lc_monetary setting. The range shown in the table assumes there are two fractional digits. Input is accepted in a variety of formats, including integer and floating-point literals, as well as typical currency formatting, such as '$1,000.00'. Output is generally in the latter form but depends on the locale.
Would it be better to wait and see if PostgreSQL implements a better solution for the money type? Even on their own wiki they don't encourage using it at this time; https://wiki.postgresql.org/wiki/Don%27t_Do_This#Don.27t_use_money
Making an identical type in Cockroach would be adding a type that already is stricken with flaws. But making those improvements to the new type would then potentially make it incompatible with PostgreSQL's behavior.
Making an improved type might be best rather than trying to make it compatible.
@elliotcourant Thanks for the information! I agree with the sentiment -- before we commit to working on this we will make sure there is a good case for it. There are almost certainly other compatibility issues we will prioritize higher.
The issue was filed just so we can track known compatibility issues using the A-sql-pgcompat label.
Most helpful comment
Would it be better to wait and see if PostgreSQL implements a better solution for the money type? Even on their own wiki they don't encourage using it at this time; https://wiki.postgresql.org/wiki/Don%27t_Do_This#Don.27t_use_money
Making an identical type in Cockroach would be adding a type that already is stricken with flaws. But making those improvements to the new type would then potentially make it incompatible with PostgreSQL's behavior.
Making an improved type might be best rather than trying to make it compatible.