Michael Paquier <mich...@paquier.xyz> writes: > Alias.aliasname is not qualified, so it means that we'd begin to > assign the same query ID even if using two relations from two schemas > depending on what search_path assigns, no?
Right. I'm arguing that that's good. The proposed patch already obscures the difference between similar table names in different (temp) schemas, and I'm suggesting that taking that a bit further would be fine. Note that if the tables we're considering don't have identical rowtypes, the queries would likely jumble differently anyway due to differences in Vars' varattno and vartype. regards, tom lane