Skip site navigation (1) Skip section navigation (2)

Re: intermittent error: 'variable not found in subplan target list'

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Damon Hart <dhcom(at)sundial(dot)com>
Cc: pgsql-bugs(at)postgreSQL(dot)org
Subject: Re: intermittent error: 'variable not found in subplan target list'
Date: 2004-02-27 21:49:59
Message-ID: 23455.1077918599@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Damon Hart <dhcom(at)sundial(dot)com> writes:
> Thanks for your response, the full original post follows, including both
> scripts.

Found it.  The patch for 7.4.* is attached.  It will appear in 7.4.2.

			regards, tom lane

Index: src/backend/optimizer/plan/initsplan.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/backend/optimizer/plan/initsplan.c,v
retrieving revision 1.91.2.1
diff -c -r1.91.2.1 initsplan.c
*** src/backend/optimizer/plan/initsplan.c	5 Nov 2003 22:00:52 -0000	1.91.2.1
--- src/backend/optimizer/plan/initsplan.c	27 Feb 2004 21:38:40 -0000
***************
*** 768,778 ****
  				 errmsg("equality operator for types %s and %s should be merge-joinable, but isn't",
  						format_type_be(ltype), format_type_be(rtype))));
  
  	clause = make_opclause(oprid(eq_operator),	/* opno */
  						   BOOLOID,		/* opresulttype */
  						   false,		/* opretset */
! 						   (Expr *) item1,
! 						   (Expr *) item2);
  
  	ReleaseSysCache(eq_operator);
  
--- 768,783 ----
  				 errmsg("equality operator for types %s and %s should be merge-joinable, but isn't",
  						format_type_be(ltype), format_type_be(rtype))));
  
+ 	/*
+ 	 * Now we can build the new clause.  Copy to ensure it shares no
+ 	 * substructure with original (this is necessary in case there are
+ 	 * subselects in there...)
+ 	 */
  	clause = make_opclause(oprid(eq_operator),	/* opno */
  						   BOOLOID,		/* opresulttype */
  						   false,		/* opretset */
! 						   (Expr *) copyObject(item1),
! 						   (Expr *) copyObject(item2));
  
  	ReleaseSysCache(eq_operator);
  

pgsql-bugs by date

Next:From: PostgreSQL Bugs ListDate: 2004-02-27 21:57:20
Subject: BUG #1087: psql dumps core on CTRL+ALT+\
Previous:From: Margit Schubert-WhileDate: 2004-02-27 18:24:18
Subject: ecpg multidimensional arrays

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group