Re: jsonpath

Поиск
Список
Период
Сортировка
От Alexander Korotkov
Тема Re: jsonpath
Дата
Msg-id CAPpHfdvntPkYeMeL_zO7kTCrJ+tEO51U-pFcWwWan4Pms5tbZg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: jsonpath  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: jsonpath  (Alexander Korotkov <a.korotkov@postgrespro.ru>)
Список pgsql-hackers
On Tue, May 7, 2019 at 5:35 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Alexander Korotkov <a.korotkov@postgrespro.ru> writes:
> > Attached patchset contains revised commit messages.  I'm going to
> > commit this on no objections.
>
> Sorry for slow response --- I was tied up with release preparations.
>
> The -5 patches look pretty good.  A couple of nits:
>
> @@ -774,9 +749,7 @@ executeItemOptUnwrapTarget(JsonPathExecContext *cxt, JsonPathItem *jsp,
>              {
>                  RETURN_ERROR(ereport(ERROR,
>                                       (errcode(ERRCODE_JSON_ARRAY_NOT_FOUND),
> -                                      errmsg(ERRMSG_JSON_ARRAY_NOT_FOUND),
> -                                      errdetail("jsonpath array accessor can "
> -                                                "only be applied to an array"))));
> +                                      errdetail("jsonpath array accessor can only be applied to an array"))));
>              }
>              break;
>
> I think you forgot to s/errdetail/errmsg/ in this one.  Likewise at:
>
> +                                      errdetail("jsonpath wildcard member accessor can only be applied to an
object"))));
>
>
> Also, I saw two places where you missed removing a trailing period
> from an errmsg:
>
> +                              errmsg("left operand of jsonpath operator %s is not a single numeric value.",
> +                                     jspOperationName(jsp->type)))));
>
> +                              errmsg("right operand of jsonpath operator %s is not a single numeric value.",
> +                                     jspOperationName(jsp->type)))));
>
>
> I'd suggest making a quick pass for other instances of the same mistakes,
> just in case.  I'm good with the wording on everything now.

Thank you!  I've catched couple other cases with errdetail() instead
of errmsg().  Pushed.

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company



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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: make \d pg_toast.foo show its indices
Следующее
От: Tom Lane
Дата:
Сообщение: Re: New EXPLAIN option: ALL