Thread: Query error corrected after vacuum

Query error corrected after vacuum

From
Matt Doucleff
Date:
Hi,

I'm getting the following error:

select name from files where dir_id =
    (select id from dirs where domain_id =
        (select id from domains where domain = 'foo'))

ERROR:  ExecReScanSetParamPlan: extParam list of plan is NULL

My test program drops the relevant tables, then recreates them before performing the above query.  I don't get this
errorif I run vacuum after creating the "dirs" table.  This problem sounds similar to an old post I found: 

http://looking-glass.usask.ca:82/mhonarc/pgsql-general/1999-02/msg00318.html

Please respond via personal email. Thank you for you help,

    Matt

Re: Query error corrected after vacuum

From
Tod McQuillin
Date:
On Sat, 11 Nov 2000, Matt Doucleff wrote:

> I'm getting the following error:
>
> select name from files where dir_id =
>     (select id from dirs where domain_id =
>         (select id from domains where domain = 'foo'))
>
> ERROR:  ExecReScanSetParamPlan: extParam list of plan is NULL

I don't know what's causing the error, but the above query should be the
same as this multi-table join:

select f.name from files f, dirs di, domains do
where f.dir_id = di.id
and di.domain_id = do.id
and do.domain = 'foo'

So if you can't get the nested sub-selects working the above query may
work better.
--
Tod McQuillin



Re: Query error corrected after vacuum

From
Tom Lane
Date:
Matt Doucleff <matt@digitalfountain.com> writes:
> select name from files where dir_id =
>     (select id from dirs where domain_id =
>         (select id from domains where domain = 'foo'))

> ERROR:  ExecReScanSetParamPlan: extParam list of plan is NULL

Hm.  What version are you running?  What plan does EXPLAIN show for
the above query, in both the failing and non-failing states?  Also,
what are the declarations of the tables?

            regards, tom lane