Re: proposal: plpgsql, new check for extra_errors - strict_expr_check
От | Gilles Darold |
---|---|
Тема | Re: proposal: plpgsql, new check for extra_errors - strict_expr_check |
Дата | |
Msg-id | 68f7af56-8f64-445a-a507-ba0eb2b0a2f9@darold.net обсуждение исходный текст |
Ответ на | proposal: plpgsql, new check for extra_errors - strict_expr_check (Pavel Stehule <pavel.stehule@gmail.com>) |
Ответы |
Re: proposal: plpgsql, new check for extra_errors - strict_expr_check
|
Список | pgsql-hackers |
Le 07/02/2025 à 23:00, Pavel Stehule a écrit : > Hi > > I rewrote this patch. Instead of enhancing the main SQL parser, it > does post parser checks of the parse tree. > > Now the patch is significantly less invasive (changes are just in > plpgsql - mostly in grammar), and it is smaller (without regress tests > it has half size). > > This patch allows the detection of usage of undocumented syntax for > plpgsql expressions. Using this undocumented > syntax can be the reason why badly written code (missing semicolon) > can be quietly executed without any raising of error. > > Only patch 01 is important - patches 02, 03 are prepared for review. > Patch 02 activates a new check by default, and fixes the regress test > to be executed. This is important for checking for possible false alarms. > Patch 03 disables this check and returns regress tests to their > original state. > > Regards > > Pavel Hi Pavel, I'm reviewing this patch too and I'm facing some documentation issues in patch v20250207-0001-use-strict-rules-for-parsing-PL-pgSQL-expressions.patch + it doesn't to allow to detect broken code. I'm not very good at english but I think it should be: it doesn't allow to detect broken code. Here I think the sentence is not complete: + This check is allowed only <varname>plpgsql.extra_errors</varname>. Do you mean: This check is allowed only when <varname>plpgsql.extra_errors</varname> is set to 'strict_expr_check'. Please fix these to be sure of what the code is supposed to do. Thanks -- Gilles Darold http://www.darold.net/
В списке pgsql-hackers по дате отправления: