Inaccurate comment, for family-1 polymorphic UNKNOWN type arguments
Hackorum builds and tests every patch posted to the lists, not only commitfest submissions. This is Hackorum's own CI rather than the PostgreSQL project's, and it is still under testing - please report anything that looks wrong.
You can run a PostgreSQL built from this patch straight from Docker, with no checkout and no build:
docker run --rm -p 5432:5432 ghcr.io/hackorum-dev/postgres-patch:t42911psql -h localhost -U postgresBuilt from patchset v2 (message #2), August 18, 2026 at 04:16 PM.
Every patchset is also pushed to a branch of our PostgreSQL fork, so you can check out the same tree CI built. Without a PostgreSQL checkout:
git clone --branch t42911_2 https://github.com/hackorum-dev/postgres.gitIn a checkout you already have, add the fork once:
git remote add hackorum https://github.com/hackorum-dev/postgres.gitthen, for this patchset and every later one:
git fetch hackorum t42911_2 && git checkout t42911_2Patchset v2 (message #2) is on t42911_2
Hi Hackers,
I observed that we have inaccurate comment in
enforce_generic_type_consistency.
if (!OidIsValid(elem_typeid))
{
if (allow_poly)
{
elem_typeid = ANYELEMENTOID;
array_typeid = ANYARRAYOID;
range_typeid = ANYRANGEOID;
}
else
{
/*
* Only way to get here is if all the
polymorphic args have
* UNKNOWN inputs
*/
*ereport(ERROR, *
...............
}
........
}
We reach the error condition even if there is any "anycompatible" parameter
is present (and that is of some known type say int32).
I think developer intend to report error if "we have all the family-1
polymorphic arguments as UNKNOWN".
Thoughts?
Please find attached the patch to fix this typo.
Thanks,
Himanshu
EnterpriseDB: http://www.enterprisedb.com
Attachments:
v1-0001-FIX-for-incorrect-comment-for-UNKNOWN-input-type-.patchtext/x-patch; charset=US-ASCII; name=v1-0001-FIX-for-incorrect-comment-for-UNKNOWN-input-type-.patchDownload+1-2
Himanshu Upadhyaya <upadhyaya.himanshu@gmail.com> writes:
I observed that we have inaccurate comment in
enforce_generic_type_consistency.
Fair point, but that's not the only old comment that's not being careful
about it. I applied the attached.
regards, tom lane