From: | Kirill Reshke <reshkekirill(at)gmail(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
Cc: | jian he <jian(dot)universality(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Pass ParseState as down to utility functions. |
Date: | 2024-12-09 07:50:20 |
Message-ID: | CALdSSPi0FqcbkqO9BgYcCn_0q7PKqHHwovfPLRsjNLnha79hpQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Thank you for reviewing this!
On Fri, 6 Dec 2024 at 19:01, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
> I think it would make more sense to write the commit message in terms of
> the DDL commands that now report error position, than the C functions.
> Such a list of commands does not need to be exhaustive; a
> representative-enough sample probably suffices.
Hi! I fixed the commit message as suggested.
> Once upon a time, ereport() was a simpler macro that did not
> use variadic arguments. Back then, the list of functions embedded in it
> (errcode, errmsg etc) were forced to be in an additional level of
> parentheses so that the macro would work at all (IIRC failure to do that
> resulted in strange compile-time problems). This is why a majority of
> code is written in the style with those parens. But commit e3a87b4991cc
> changed ereport to use __VA_ARGS__, so the auxiliary functions are
> actual arguments to errstart() -- which means that the parentheses
> you're adding here are unnecessary and discouraged. Just add the
> parser_errposition() call and it'll be fine.
Should be fixed in v7.
--
Best regards,
Kirill Reshke
Attachment | Content-Type | Size |
---|---|---|
v7-0001-Print-out-error-position-for-number-of-DDL-comman.patch | application/octet-stream | 35.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | David Rowley | 2024-12-09 07:53:14 | Incorrect EXPLAIN ANALYZE output in bloom index docs |
Previous Message | Michael Paquier | 2024-12-09 07:43:30 | Re: Memory leak in WAL sender with pgoutput (v10~) |