Hi. Please check the attached regression test refactoring and gram.y changes
------------------atatched patch commit
message-----------------------------------------------
v47 rpr reformat gram.y and improve regression tests
Reformat the first three alternatives of row_pattern_quantifier_opt
in gram.y (empty, '*', '+') from inline single-line actions to
multi-line blocks, making them consistent with the surrounding Op
and '{...}' alternatives.
Update regression tests to follow the convention established in
commit ecb2508aaf [1]: do not repeat exact error messages as comments
in regress test files, since such comments silently go stale when
error wording changes. Replace the removed "Expected: ERROR: ..."
comments with short descriptive comments that state what the test
is checking rather than what output it expects.
Also remove unnecessary newline/comments in src/test/regress/sql/rpr_base.sql.
Add test coverage for:
1. invalid token combinations after a quantifier (A+ !, A+ ?+,
A* ?+, A? ??), exercising the split-token error paths in
row_pattern_quantifier_opt
2. set-returning function (generate_series) in a DEFINE clause
[1]:
https://git.postgresql.org/cgit/postgresql.git/commit/?id=ecb2508aaf9b978871734ea2fdf701ab7d593d0a
----------------------------end of commit
message-------------------------------------------------
It's based on latest commit in https://github.com/assam258-5892/postgres.git
It will have a small conflict (around 100 lines difference) with v47.
In src/test/regress/sql/rpr_base.sql, wording such as ``Jacob's
Patterns`` should be removed?
```
-- Serialization/Deserialization Tests (objects kept for pg_upgrade/pg_dump)
```
I am not sure what this refers to.
In gram.y:
errmsg("quantifier bound must be between 0 and %d", INT_MAX - 1),
errmsg("quantifier bound must be between 1 and %d", INT_MAX - 1),
Will these cause consistency issues?
--
jian
https://www.enterprisedb.com/
v47-0001-v47-rpr-reformat-gram.y-and-improve-regression-tests.nocfbot
Description: Binary data
