[PATCH] Resolve unknown-type literals in GRAPH_TABLE COLUMNS

From: SATYANARAYANA NARLAPURAM <satyanarlapuram(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
Subject: [PATCH] Resolve unknown-type literals in GRAPH_TABLE COLUMNS
Date: 2026-04-25 19:52:44
Message-ID: CAHg+QDcyKNWyzDoKMxiZNjv7C-wAxs8y0ZoNkOV137Y+nk3UXg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi hackers,

transformRangeGraphTable() calls transformExpr() and
assign_list_collations() for COLUMNS expressions but missed calling
resolveTargetListUnknowns(). As a result, literals such as 'val1'
in a COLUMNS clause retained type "unknown", causing failures with
ORDER BY, UNION, and output conversions.

Fix by calling resolveTargetListUnknowns() on the columns target
list right after assign_list_collations(), similar to SELECT target lists
in
transformSelectStmt().

Attached a patch to fix this, which also includes test cases to reproduce.

Thanks,
Satya

Attachment Content-Type Size
0001-Resolve-unknown-type-literals-in-GRAPH_TABLE-COLUMNS.patch application/octet-stream 4.3 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Burd 2026-04-25 20:08:02 [PATCH] Batched clock sweep to reduce cross-socket atomic contention
Previous Message Antonin Houska 2026-04-25 17:33:38 Re: [PATCH] Compressed TOAST data corruption with REPACK CONCURRENTLY