| From: | jian he <jian(dot)universality(at)gmail(dot)com> |
|---|---|
| To: | assam258(at)gmail(dot)com |
| Cc: | Tatsuo Ishii <ishii(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org, zsolt(dot)parragi(at)percona(dot)com, sjjang112233(at)gmail(dot)com, vik(at)postgresfriends(dot)org, er(at)xs4all(dot)nl, jacob(dot)champion(at)enterprisedb(dot)com, david(dot)g(dot)johnston(at)gmail(dot)com, peter(at)eisentraut(dot)org, li(dot)evan(dot)chao(at)gmail(dot)com |
| Subject: | Re: Row pattern recognition |
| Date: | 2026-06-24 05:12:30 |
| Message-ID: | CACJufxE80E13g575_ywVjDat-Lmmx3WkukzqRvb936P0jA4h6w@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Wed, Jun 24, 2026 at 10:33 AM jian he <jian(dot)universality(at)gmail(dot)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.
| Attachment | Content-Type | Size |
|---|---|---|
| v50-0001-parse_func-minor-cleanup-in-ParseRPRNavCall.nocfbot | application/octet-stream | 5.8 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | shveta malik | 2026-06-24 05:21:20 | Re: [PATCH] Preserve replication origin OIDs in pg_upgrade |
| Previous Message | shveta malik | 2026-06-24 05:09:00 | Re: [PATCH] Preserve replication origin OIDs in pg_upgrade |