Re: Row pattern recognition
jian he <jian.universality@gmail.com>
From: jian he <jian.universality@gmail.com>
To: Tatsuo Ishii <ishii@postgresql.org>
Cc: assam258@gmail.com, zsolt.parragi@percona.com, sjjang112233@gmail.com, vik@postgresfriends.org, er@xs4all.nl, jacob.champion@enterprisedb.com, david.g.johnston@gmail.com, peter@eisentraut.org, li.evan.chao@gmail.com, pgsql-hackers@postgresql.org
Date: 2026-06-04T09:20:07Z
Lists: pgsql-hackers
Attachments
- v47-0001-v47-rpr-reformat-gram.y-and-improve-regression-tests.nocfbot (application/octet-stream)
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/
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Adjust cross-version upgrade tests for seg_out() fix
- 3e3d7875e956 19 (unreleased) cited
-
Rationalize error comments in partition split/merge tests
- ecb2508aaf9b 19 (unreleased) cited
-
Add fast path for foreign key constraint checks
- 2da86c1ef9b5 19 (unreleased) cited
-
Fix assorted pretty-trivial memory leaks in the backend.
- e78d1d6d47dc 19 (unreleased) cited
-
Add temporal FOREIGN KEY contraints
- 89f908a6d0ac 18.0 cited
-
Add trailing commas to enum definitions
- 611806cd726f 17.0 cited
-
Remove obsolete executor cleanup code
- d060e921ea5a 17.0 cited