Re: More new SQL/JSON item methods

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: More new SQL/JSON item methods
Дата
Msg-id 1691834.1706506402@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: More new SQL/JSON item methods  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Ответы Re: More new SQL/JSON item methods  (Jeevan Chalke <jeevan.chalke@enterprisedb.com>)
Список pgsql-hackers
Kyotaro Horiguchi <horikyota.ntt@gmail.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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: Update the doc that refers to the removed column of pg_replication_slots.
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: Fix inappropriate comments in function ReplicationSlotAcquire