From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> |
Cc: | jeevan(dot)chalke(at)enterprisedb(dot)com, andrew(at)dunslane(dot)net, peter(at)eisentraut(dot)org, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: More new SQL/JSON item methods |
Date: | 2024-01-29 05:33:22 |
Message-ID: | 1691834.1706506402@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> writes:
> Having said that, I'm a bit concerned about the case where an overly
> long string is given there. However, considering that we already have
> "invalid input syntax for type xxx: %x" messages (including for the
> numeric), this concern might be unnecessary.
Yeah, we have not worried about that in the past.
> Another concern is that the input value is already a numeric, not a
> string. This situation occurs when the input is NaN of +-Inf. Although
> numeric_out could be used, it might cause another error. Therefore,
> simply writing out as "argument NaN and Infinity.." would be better.
Oh! I'd assumed that we were discussing a string that we'd failed to
convert to numeric. If the input is already numeric, then either
the error is unreachable or what we're really doing is rejecting
special values such as NaN on policy grounds. I would ask first
if that policy is sane at all. (I'd lean to "not" --- if we allow
it in the input JSON, why not in the output?) If it is sane, the
error message needs to be far more specific.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2024-01-29 05:49:51 | Re: Fix inappropriate comments in function ReplicationSlotAcquire |
Previous Message | Amit Kapila | 2024-01-29 05:25:57 | Re: Update the doc that refers to the removed column of pg_replication_slots. |