| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | David Rowley <dgrowleyml(at)gmail(dot)com> |
| Cc: | PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Lots of incorrect comments in nodeFuncs.c |
| Date: | 2021-04-08 22:11:46 |
| Message-ID: | 1933940.1617919906@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
David Rowley <dgrowleyml(at)gmail(dot)com> writes:
> I noticed that nodeFuncs.c appears to have some pretty sloppy work
> done in many of the comments. Many look like they've just not been
> updated from a copy/paste/edit from another node function.
> The attached aims to clean these up.
I believe every one of these changes is wrong.
For instance:
case T_ScalarArrayOpExpr:
- coll = InvalidOid; /* result is always boolean */
+ coll = InvalidOid; /* result is always InvalidOid */
break;
The point here is that the result type of ScalarArrayOpExpr is boolean,
which has no collation, therefore reporting its collation as InvalidOid
is correct. Maybe there's a clearer way to say that, but your text is
more confusing not less so.
Likewise, the point of the annotations in exprSetCollation is to not
let a collation be applied to a node that must have a noncollatable
result type.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Mark Dilger | 2021-04-08 22:51:41 | Re: pg_amcheck contrib application |
| Previous Message | Robert Haas | 2021-04-08 22:11:17 | Re: pg_amcheck contrib application |