Radical suggestion for plan executor? - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Radical suggestion for plan executor?
Date
Msg-id 20010714120652.C11863@svana.org
Whole thread Raw
Responses Re: Radical suggestion for plan executor?
List pgsql-hackers
I notice that the query executor currently has a lot of switch statements on
the the type of node it is descending to. This means you get a call tree
like:

ExecProcNode ExecNestLoop   ExecProcNode     ExecMergeJoin       ...

Wouldn't it be nicer if the Plan had access to function pointers that
already referred to the right function. So instead of:

result = ExecProcNode( a, b )

you get:

a->procs.exec( b );

It compresses the call tree down a bit. However, I'm not sure if it has many
benefits other than maintainability.

OTOH, you could keep ExecProcNode and just replace the switch with a
function call.

Any thoughts?
-- 
Martijn van Oosterhout <kleptog@svana.org>
http://svana.org/kleptog/
> It would be nice if someone came up with a certification system that
> actually separated those who can barely regurgitate what they crammed over
> the last few weeks from those who command secret ninja networking powers.


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Re: [PATCH] To remove EXTEND INDEX
Next
From: mlw
Date:
Subject: Re: SOMAXCONN (was Re: Solaris source code)