Re: Row pattern recognition
jian he <jian.universality@gmail.com>
From: jian he <jian.universality@gmail.com>
To: assam258@gmail.com
Cc: Tatsuo Ishii <ishii@postgresql.org>, pgsql-hackers@postgresql.org, 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
Date: 2026-06-24T05:12:30Z
Lists: pgsql-hackers
Attachments
- v50-0001-parse_func-minor-cleanup-in-ParseRPRNavCall.nocfbot (application/octet-stream)
On Wed, Jun 24, 2026 at 10:33 AM jian he <jian.universality@gmail.com> wrote:
>
> Hi.
>
> It's still based on https://github.com/assam258-5892/postgres/commits/RPR
>
/*
* Once the name matches we never fall back to function resolution, so any
* decoration that does not make sense for a navigation operation is a
* hard error. The aggregate/window decorations (agg_star, DISTINCT,
* WITHIN GROUP, ORDER BY, FILTER, OVER, RESPECT/IGNORE NULLS) are already
* rejected by the common path in ParseFuncOrColumn, which treated the
* recognized name as an ordinary function; what remains are the
* decorations that path accepts for a plain function but a navigation
* operation must still reject.
*/
The above comments can be deleted, ParseRPRNavCall, ParseFuncOrColumn
already have lots of comments.
Also the error check and its message are quite intuitive in ParseRPRNavCall.
coerce_to_common_type have comments:
```
* This is used following select_common_type() to coerce the individual
* expressions to the desired type
```
coerce_to_target_type comments says
```
* This is the general-purpose entry point for arbitrary type coercion
* operations.
```
So, I tended to use coerce_to_target_type.
ParseRPRNavCall ending can be simplified because coerce_to_target_type
can handle the same data type.
Therefore, `if (offtype != INT8OID)` is not necessary.
Drop the extra parentheses around ereport() argument lists, fewer
parentheses are always better for new code.
--
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