Patch for multi-key GiST (current CVS)

Started by Oleg Bartunovover 24 years ago3 messages
#1Oleg Bartunov
oleg@sai.msu.su
1 attachment(s)

Please apply attached patch to current CVS.
It fixes problem if query contains field (with GiST index) more than 1 time.
Corrensponding patch for 7.1.2 is available from
http://www.sai.msu.su/~megera/postgres/gist

Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83

Attachments:

patch_mk_core.72text/plain; charset=US-ASCII; name=patch_mk_core.72Download
*** src/backend/access/gist/gistscan.c.orig	Thu Jun 28 14:34:53 2001
--- src/backend/access/gist/gistscan.c	Thu Jun 28 14:35:19 2001
***************
*** 117,123 ****
  			s->keyData[i].sk_procedure
  				= RelationGetGISTStrategy(s->relation, s->keyData[i].sk_attno,
  										  s->keyData[i].sk_procedure);
! 			s->keyData[i].sk_func = p->giststate->consistentFn[i];
  		}
  	}
  	else
--- 117,123 ----
  			s->keyData[i].sk_procedure
  				= RelationGetGISTStrategy(s->relation, s->keyData[i].sk_attno,
  										  s->keyData[i].sk_procedure);
! 			s->keyData[i].sk_func = p->giststate->consistentFn[s->keyData[i].sk_attno-1];
  		}
  	}
  	else
***************
*** 148,154 ****
  				s->keyData[i].sk_procedure
  					= RelationGetGISTStrategy(s->relation, s->keyData[i].sk_attno,
  											  s->keyData[i].sk_procedure);
! 				s->keyData[i].sk_func = p->giststate->consistentFn[i];
  			}
  	}
  
--- 148,154 ----
  				s->keyData[i].sk_procedure
  					= RelationGetGISTStrategy(s->relation, s->keyData[i].sk_attno,
  											  s->keyData[i].sk_procedure);
! 				s->keyData[i].sk_func = p->giststate->consistentFn[s->keyData[i].sk_attno-1];
  			}
  	}
  
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Oleg Bartunov (#1)
Re: Patch for multi-key GiST (current CVS)

Oleg Bartunov <oleg@sai.msu.su> writes:

Please apply attached patch to current CVS.
It fixes problem if query contains field (with GiST index) more than 1 time.

Applied, thanks.

regards, tom lane

#3Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Oleg Bartunov (#1)
Re: Patch for multi-key GiST (current CVS)

Patch applied by Tom. Thanks.

Please apply attached patch to current CVS.
It fixes problem if query contains field (with GiST index) more than 1 time.
Corrensponding patch for 7.1.2 is available from
http://www.sai.msu.su/~megera/postgres/gist

Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83

Content-Description:

[ Attachment, skipping... ]

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026