Skip site navigation (1) Skip section navigation (2)

Re: Avoid needless copy in nodeMaterial

From: Neil Conway <neilc(at)samurai(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Avoid needless copy in nodeMaterial
Date: 2007-10-16 04:55:35
Message-ID: 1192510535.6133.28.camel@goldbach (view raw or flat)
Thread:
Lists: pgsql-patches
On Tue, 2007-10-16 at 00:34 -0400, Tom Lane wrote:
> Seems like this needs more comments about what's happening, rather
> than less ...

Fair point.

> Also, it looks to me like the plan node's own resultslot might never be
> assigned to at all, when the subplan returns zero rows.  Does this
> corner case still work correctly?

ISTM the node's own result slot wouldn't be assigned to in this case
regardless: (nodeMaterial.c, circa 116)

	outerslot = ExecProcNode(outerNode);
	if (TupIsNull(outerslot))
	{
		node->eof_underlying = true;
		return NULL;
	}

There's no requirement that we must assign to the result slot, AFAICS.

-Neil



In response to

pgsql-patches by date

Next:From: ITAGAKI TakahiroDate: 2007-10-16 05:11:20
Subject: Re: V3 protocol is slower than V2
Previous:From: Tom LaneDate: 2007-10-16 04:45:37
Subject: Re: V3 protocol is slower than V2

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group