pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Make cast functions to type money error safe
Date: Mon, 30 Mar 2026 08:11:53 +0000
Message-ID: <E1w77iy-0027Zi-1r@gemulon.postgresql.org> (raw)

Make cast functions to type money error safe

This converts the cast functions from types integer, bigint, and
numeric to type money to support soft errors.

Note: Casting from type money to type numeric (the other way, function
cash_numeric) is not yet error safe.

Author: jian he <jian.universality@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/CADkLM%3Dfv1JfY4Ufa-jcwwNbjQixNViskQ8jZu3Tz_p656i_4hQ%40m...

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/b36b95640487b9dc70408e9078c30e80963efccb

Modified Files
--------------
src/backend/utils/adt/cash.c | 28 +++++++++++++++++++---------
1 file changed, 19 insertions(+), 9 deletions(-)



Message-ID: <E1w77iy-0027Zi-1r@gemulon.postgresql.org>
Permalink:  ../E1w77iy-0027Zi-1r@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1w77iy-0027Zi-1r@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: peter@eisentraut.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Make cast functions to type money error safe
  In-Reply-To: <E1w77iy-0027Zi-1r@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox