This still looks to me like it would reverse the behavior in the case
where the Ident name could be either a column or table name. You should
do transformTargetEntry first, same as the code does now, and *then*
look to see if you still have an Ident with isRel true.
regards, tom lane