subselects

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: vadim(at)sable(dot)krasnoyarsk(dot)su (Vadim B(dot) Mikheev)
Cc: hackers(at)postgreSQL(dot)org (PostgreSQL-development)
Subject: subselects
Date: 1998-01-20 22:18:54
Message-ID: 199801202218.RAA15186@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I have completed adding Var.varlevelsup, and have added code to the
parser to properly set the field. It will allow correlated references
in the WHERE clause, but not in the target list.

I did not make many changes in the optimizer or executor because I
believed varlevelsup would be zero by the time it got to that point.
For example, there are cases where the optimizer calls getrelid(Var *,
RangeTable), and of course, because we don't have a parentQuery* in the
Query, this will ignore the varlevelsup and only look in the current
range table.

I did make a few additions of varlevelsup in cases where they were
checking for equality or copying Var records. I made changes in all the
support code, like /nodes handling.

Let me know if you need additional changes. makeVar takes a new
varlevelsup parameter, and I made changes to all calls.

I have tested the code, and debug output shows varlevelsup being set
correctly.

The only open item is how to do rewrite. I will check into this later,
probably in a week. It will work by Feb 1.

--
Bruce Momjian
maillist(at)candle(dot)pha(dot)pa(dot)us

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1998-01-21 03:24:11 subselects
Previous Message James Hughes 1998-01-20 20:13:29 Re: [HACKERS] Authentication Woes