pgsql: Fix planning of SubLinks to ensure that Vars generated from

Lists: pgsql-committerspgsql-hackers
From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix planning of SubLinks to ensure that Vars generated from
Date: 2006-12-06 19:40:01
Message-ID: 20061206194001.D50409FA1DE@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Log Message:
-----------
Fix planning of SubLinks to ensure that Vars generated from transformation of
a sublink's test expression have the correct vartypmod, rather than defaulting
to -1. There's at least one place where this is important because we're
expecting these Vars to be exactly equal() to those appearing in the subplan
itself. This is a pretty klugy solution --- it would likely be cleaner to
change Param nodes to include a typmod field --- but we can't do that in the
already-released 8.2 branch.
Per bug report from Hubert Fongarnand.

Modified Files:
--------------
pgsql/src/backend/optimizer/plan:
subselect.c (r1.112 -> r1.113)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/plan/subselect.c.diff?r1=1.112&r2=1.113)


From: "Andrew Dunstan" <andrew(at)dunslane(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Fix planning of SubLinks to ensure that
Date: 2006-12-07 12:25:12
Message-ID: 63990.65.211.31.251.1165494312.squirrel@www.dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Tom Lane wrote:
> Log Message:
> -----------
> Fix planning of SubLinks to ensure that Vars generated from transformation
> of
> a sublink's test expression have the correct vartypmod, rather than
> defaulting
> to -1. There's at least one place where this is important because we're
> expecting these Vars to be exactly equal() to those appearing in the
> subplan
> itself. This is a pretty klugy solution --- it would likely be cleaner to
> change Param nodes to include a typmod field --- but we can't do that in
> the
> already-released 8.2 branch.
> Per bug report from Hubert Fongarnand.
>

I'm slightly confused by this commit message. Is this commit on HEAD a
temporary measure pending a cleaner fix, or is it the intended permanent
fix, notwithstanding the kludginess?

cheers

andrew


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgresql(dot)org
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Fix planning of SubLinks to ensure that
Date: 2006-12-07 16:15:01
Message-ID: 15818.1165508101@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

"Andrew Dunstan" <andrew(at)dunslane(dot)net> writes:
> Tom Lane wrote:
>> This is a pretty klugy solution --- it would likely be cleaner to
>> change Param nodes to include a typmod field --- but we can't do that in
>> the already-released 8.2 branch.

> I'm slightly confused by this commit message. Is this commit on HEAD a
> temporary measure pending a cleaner fix, or is it the intended permanent
> fix, notwithstanding the kludginess?

I have a to-do item to look at the idea of adding typmod to Param, but
am not committing to do it yet. In the meantime I figured the bug should
get fixed.

regards, tom lane