"Marko Kreen" <[EMAIL PROTECTED]> writes: > On 11/10/07, Tom Lane <[EMAIL PROTECTED]> wrote: >> Can anyone comment on how Oracle handles cases like this?
> Some googling brought following link: > http://download-uk.oracle.com/docs/cd/B14117_01/appdev.101/b10807/d_names.htm Hmm, interesting document. I think the bit that is relevant for us is the statement : An outer capture occurs when a name in an inner scope, which once : resolved to an entity in an inner scope, is resolved to an entity in an : outer scope. SQL and PL/SQL are designed to prevent outer captures. You : do not need to take any action to avoid this condition. AFAICT this means that if there is any ambiguity, the most closely nested possible interpretation will always win. Therefore the current behavior of plpgsql is indeed wrong, because it searches up the namespace stack for block labels too soon. I'll go see about changing that. The subsection "Qualifying References to Object Attributes and Methods" describes some truly bletcherous behavior --- you can't reference a complex-column component unless you start from a table alias? How non-orthogonal. I prefer our current solution of making you parenthesize the column reference before you access its component ... regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly