David Rowley <david.row...@2ndquadrant.com> writes: > On 17 September 2017 at 08:07, Kim Rose Carlsen <k...@hiper.dk> wrote: >> It seems there are some difference in VARCHAR vs TEXT when postgres tries to >> decide if a LEFT JOIN is useful or not.
> Yeah, it looks like the code to check for distinctness in the subquery > fails to consider that the join condition may contain RelabelTypes > instead of plain Vars. > > The attached fixes. Looks like a good fix to me (except for the copied-and-pasted, not-quite-on-point comment ;-)). Pushed. regards, tom lane -- Sent via pgsql-hackers mailing list (firstname.lastname@example.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers