Thank you for reviewing this! On Fri, 6 Dec 2024 at 19:01, Alvaro Herrera <alvhe...@alvh.no-ip.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
v7-0001-Print-out-error-position-for-number-of-DDL-comman.patch
Description: Binary data