Re: [HACKERS] TIME QUALIFICATION

From: Vadim Mikheev <vadim(at)krs(dot)ru>
To: Jan Wieck <jwieck(at)debis(dot)com>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] TIME QUALIFICATION
Date: 1999-02-11 17:04:33
Message-ID: 36C30DA1.70A81C78@krs.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jan Wieck wrote:
>
> For that preprocessing required to associate RTE's with
> snapshots I need the exact output of the rewrite system at
> ExecutorStart() time, so I'm able to find all the RTE's.
>
> So far I've found that the planner NULL's out subselects in
> _make_subplan(). A first (very little) test showed, that it
> seems to work without doing so too. Who coded that and why
> is it done there?

Do you mean subselect.c:147 line:

slink->subselect = NULL; /* cool ?! */

?

As I remember this is done to don't copy subquery' Query
node in copyObject when copying plan. Actually, using
Query node in Executor is annoying me for ~ 1 year:
Executor need not in entire Query node, only in range table!
Using Query in Executor is bad for prepared plans: we do
copying and storing of mostly useless Query node...
This would be nice to have some new TopPlan node with
upmost plan, range table and some other things (I had to
add some fields to Plan node itself for subqueries while
these fields should be only in topmost plan node) and get rid
of using Query in Executor. Query is result of parsing,
plan is result of planning and source for execution.

If you don't want to implement TopPlan node then you could
allocate new SubLink node in subselect.c:_make_subplan()
to be used in node->sublink...

Vadim

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas G. Lockhart 1999-02-11 17:08:59 Re: [HACKERS] date_part() BUG?
Previous Message Oleg Broytmann 1999-02-11 16:35:35 Re: [HACKERS] VACUUM ANALYZE problem on linux