Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit065683b

Browse files
committed
Fix name of the macro for getting signature length trgm_gist.c
911e702 has introduced the opclass parameters including signature lengthfor a set of GiST opclasses. Due to copy-pasting, macro for getting thesignature length in trgm_gist.c was named LTREE_GET_ASIGLEN(). Fix that byrenaming this macro to just GET_SIGLEN().Backpatch-through: 13
1 parent9a94b92 commit065683b

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

‎contrib/pg_trgm/trgm_gist.c‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ typedef struct
1616
intsiglen;/* signature length in bytes */
1717
}TrgmGistOptions;
1818

19-
#defineLTREE_GET_ASIGLEN()(PG_HAS_OPCLASS_OPTIONS() ? \
19+
#defineGET_SIGLEN()(PG_HAS_OPCLASS_OPTIONS() ? \
2020
((TrgmGistOptions *) PG_GET_OPCLASS_OPTIONS())->siglen : \
2121
SIGLEN_DEFAULT)
2222

@@ -108,7 +108,7 @@ Datum
108108
gtrgm_compress(PG_FUNCTION_ARGS)
109109
{
110110
GISTENTRY*entry= (GISTENTRY*)PG_GETARG_POINTER(0);
111-
intsiglen=LTREE_GET_ASIGLEN();
111+
intsiglen=GET_SIGLEN();
112112
GISTENTRY*retval=entry;
113113

114114
if (entry->leafkey)
@@ -195,7 +195,7 @@ gtrgm_consistent(PG_FUNCTION_ARGS)
195195

196196
/* Oidsubtype = PG_GETARG_OID(3); */
197197
bool*recheck= (bool*)PG_GETARG_POINTER(4);
198-
intsiglen=LTREE_GET_ASIGLEN();
198+
intsiglen=GET_SIGLEN();
199199
TRGM*key= (TRGM*)DatumGetPointer(entry->key);
200200
TRGM*qtrg;
201201
boolres;
@@ -448,7 +448,7 @@ gtrgm_distance(PG_FUNCTION_ARGS)
448448

449449
/* Oidsubtype = PG_GETARG_OID(3); */
450450
bool*recheck= (bool*)PG_GETARG_POINTER(4);
451-
intsiglen=LTREE_GET_ASIGLEN();
451+
intsiglen=GET_SIGLEN();
452452
TRGM*key= (TRGM*)DatumGetPointer(entry->key);
453453
TRGM*qtrg;
454454
float8res;
@@ -557,7 +557,7 @@ gtrgm_union(PG_FUNCTION_ARGS)
557557
GistEntryVector*entryvec= (GistEntryVector*)PG_GETARG_POINTER(0);
558558
int32len=entryvec->n;
559559
int*size= (int*)PG_GETARG_POINTER(1);
560-
intsiglen=LTREE_GET_ASIGLEN();
560+
intsiglen=GET_SIGLEN();
561561
int32i;
562562
TRGM*result=gtrgm_alloc(false,siglen,NULL);
563563
BITVECPbase=GETSIGN(result);
@@ -583,7 +583,7 @@ gtrgm_same(PG_FUNCTION_ARGS)
583583
TRGM*a= (TRGM*)PG_GETARG_POINTER(0);
584584
TRGM*b= (TRGM*)PG_GETARG_POINTER(1);
585585
bool*result= (bool*)PG_GETARG_POINTER(2);
586-
intsiglen=LTREE_GET_ASIGLEN();
586+
intsiglen=GET_SIGLEN();
587587

588588
if (ISSIGNKEY(a))
589589
{/* then b also ISSIGNKEY */
@@ -680,7 +680,7 @@ gtrgm_penalty(PG_FUNCTION_ARGS)
680680
GISTENTRY*origentry= (GISTENTRY*)PG_GETARG_POINTER(0);/* always ISSIGNKEY */
681681
GISTENTRY*newentry= (GISTENTRY*)PG_GETARG_POINTER(1);
682682
float*penalty= (float*)PG_GETARG_POINTER(2);
683-
intsiglen=LTREE_GET_ASIGLEN();
683+
intsiglen=GET_SIGLEN();
684684
TRGM*origval= (TRGM*)DatumGetPointer(origentry->key);
685685
TRGM*newval= (TRGM*)DatumGetPointer(newentry->key);
686686
BITVECPorig=GETSIGN(origval);
@@ -788,7 +788,7 @@ gtrgm_picksplit(PG_FUNCTION_ARGS)
788788
GistEntryVector*entryvec= (GistEntryVector*)PG_GETARG_POINTER(0);
789789
OffsetNumbermaxoff=entryvec->n-2;
790790
GIST_SPLITVEC*v= (GIST_SPLITVEC*)PG_GETARG_POINTER(1);
791-
intsiglen=LTREE_GET_ASIGLEN();
791+
intsiglen=GET_SIGLEN();
792792
OffsetNumberk,
793793
j;
794794
TRGM*datum_l,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp