From: Tom Lane <tgl@sss.pgh.pa.us>
To: ldm@apartia.ch
Cc: PGSQL-SQL <pgsql-sql@postgresql.org>
Subject: Re: ERROR: replace_vars_with_subplan_refs (!?)
Date: Wed, 20 Sep 2000 12:13:12 -0400
Message-ID: <23699.969466392@sss.pgh.pa.us> (raw)
In-Reply-To: <20000920171335.A679@styx>
References: <39C69B97.58B353A9@ec.gc.ca>
<20000920152552.A3958@styx>
<19704.969461039@sss.pgh.pa.us>
<20000920171335.A679@styx>
Louis-David Mitterrand <ldm@apartia.ch> writes:
> On Wed, Sep 20, 2000 at 10:43:59AM -0400, Tom Lane wrote:
>> Louis-David Mitterrand <cunctator@apartia.ch> writes:
>>>> How should I interpret that error?
>>>> ERROR: replace_vars_with_subplan_refs: variable not in subplan target list
>>
>> Looks like a bug to me. I think this may already be fixed in current
>> sources, but not sure. Could I trouble you for the relevant table
>> declarations, so I can try the example without a lot of guessing?
> Please find attached the full dump.
OK, this is indeed fixed in current sources. I think you are running
into the same problem you reported in June, namely that subselects
appearing in the targetlist of an Append plan are misprocessed in 7.0.*.
Append is mainly used for handling inherited queries, so it's the
combination of inheritance and subselect in targetlist that's needed
to trigger the bug.
This probably also explains the other report you filed this morning;
once the subselect is messed up, all sorts of things start to go wrong
:-(
I think you could back-patch the fix into 7.0.* just by dropping rev
1.64 of setrefs.c into the 7.0 source tree --- see
http://www.postgresql.org/cgi/cvswebtest.cgi/pgsql/src/backend/optimizer/plan/setrefs.c
for that version.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, ldm@apartia.ch
Subject: Re: ERROR: replace_vars_with_subplan_refs (!?)
In-Reply-To: <23699.969466392@sss.pgh.pa.us>
References: <39C69B97.58B353A9@ec.gc.ca> <20000920152552.A3958@styx> <19704.969461039@sss.pgh.pa.us> <20000920171335.A679@styx> <23699.969466392@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox