From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
Cc: | "houzj(dot)fnst(at)fujitsu(dot)com" <houzj(dot)fnst(at)fujitsu(dot)com>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: A doubt about a newly added errdetail |
Date: | 2022-09-28 03:28:56 |
Message-ID: | CAA4eK1JPs40WrnwTZQAJiEgzRpxFd1ZBmBCuxdGNFHthox=UUQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Sep 27, 2022 at 6:12 PM Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
>
> While reading this code, I noticed that function expr_allowed_in_node()
> has a very strange API: it doesn't have any return convention at all
> other than "if we didn't modify errdetail_str then all is good". I was
> tempted to add an "Assert(*errdetail_msg == NULL)" at the start of it,
> just to make sure that it is not called if a message is already set.
>
> I think it would be much saner to inline the few lines of that function
> in its sole caller, as in the attached.
>
LGTM.
--
With Regards,
Amit Kapila.
From | Date | Subject | |
---|---|---|---|
Next Message | John Naylor | 2022-09-28 03:31:33 | Re: Insertion Sort Improvements |
Previous Message | Michael Paquier | 2022-09-28 03:28:25 | Re: SYSTEM_USER reserved word implementation |