Why doesn't the first one work when the second one works fine? In other words, why do subquery's traget list and range table list use different namespaces to resolve table references/aliases?
Is this an unintended behaviour, implementation detail or is there an actual reason for this?
Thanks for your help.
Alexander Levsha