From: | Miroslav Šulc <miroslav(dot)sulc(at)startnet(dot)cz> |
---|---|
To: | PGSQL mailing list <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: ERROR: variable not found in subplan target lists |
Date: | 2007-10-04 12:12:09 |
Message-ID: | 4704D899.90909@startnet.cz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Just copied client database from production server to my dev database
and ran the query on my dev database and it fails too so it seems it
also depends on whether some data are contained in the tables or not.
--
Miroslav Šulc
Miroslav Šulc napsal(a):
> Hi,
>
> I get this error when running this query (generated by code so it is not
> ideal though still valid I guess):
>
> SELECT Invoice.* FROM Invoice WHERE false AND InvoiceGroupId IN (SELECT
> InvoiceGroup.Id FROM InvoiceGroup INNER JOIN PartnerBranch ON
> InvoiceGroup.PartnerBranchId = PartnerBranch.Id WHERE
> PartnerBranch.PartnerIdentificationId IN (132));
>
> Running these modified queries works without problems:
>
> SELECT Invoice.* FROM Invoice WHERE InvoiceGroupId IN (SELECT
> InvoiceGroup.Id FROM InvoiceGroup INNER JOIN PartnerBranch ON
> InvoiceGroup.PartnerBranchId = PartnerBranch.Id WHERE
> PartnerBranch.PartnerIdentificationId IN (132));
>
> SELECT Invoice.* FROM Invoice WHERE false AND InvoiceGroupId IN (SELECT
> InvoiceGroup.Id FROM InvoiceGroup INNER JOIN PartnerBranch ON
> InvoiceGroup.PartnerBranchId = PartnerBranch.Id);
>
> SELECT Invoice.* FROM Invoice WHERE false AND InvoiceGroupId IN (SELECT
> InvoiceGroup.Id FROM InvoiceGroup INNER JOIN PartnerBranch ON
> InvoiceGroup.PartnerBranchId = PartnerBranch.Id WHERE PartnerBranch.Id
> IN (132));
>
> The weird thing is it occurs only on production server, not on any other
> of pg installations. All of them are pg 8.2.4 on Gentoo Linux.
>
> I'd appreciate any help as the problem occurs on production server and I
> need to solve it ASAP.
>
> --
> Miroslav Šul
From | Date | Subject | |
---|---|---|---|
Next Message | Andreas Strasser | 2007-10-04 12:46:11 | Re: Design Question (Time Series Data) |
Previous Message | Miroslav Šulc | 2007-10-04 12:00:39 | ERROR: variable not found in subplan target lists |