Richard Guo <guofenglinux@gmail.com> writes:
> On Fri, Sep 26, 2025 at 11:23 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> As an example of edge cases that your idea introduces, what happens
>> if a user-written subquery name is "expr_999999999999999999999999"
>> and then we need to generate a unique name based on "expr"? Now
>> we have an integer-overflow situation to worry about, with possibly
>> platform-dependent results.
> I'd argue that this hypothetical edge case can be resolved with a bit
> of canonicalization in how subplan names are represented internally.
[ raised eyebrow... ] How did you get to that from the complaint
that Robert's patch was not obviously bug-free? (A complaint I
thought was unmerited, but nevermind.) This proposal is neither
simple, nor obviously bug-free. Moreover, in view of comments
upthread, I think we should look with great suspicion on any
proposal that involves changing user-supplied subquery aliases
unnecessarily.
regards, tom lane