Carmen Gloria Sepulveda Dedes <csepulveda@atichile.com> writes:
> Ok ... sorry.
> [example snipped]
> ... but ... on execute, I get the error:
> ERROR: variable not found in subplan target list
Hmm. I tried your example on CVS tip and didn't see a problem, which
means either that the bug is already fixed or that the example with
no data isn't sufficient to trigger it. If you enter just the table
declarations you gave into an empty database and then try the INSERT,
does it fail? If not, can you make it fail by altering the values of
enable_nestloop, enable_mergejoin, enable_hashjoin?
regards, tom lane