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

Commiteaf0380

Browse files
committed
Fix C++ compile failures in headers.
Avoid using "typeid" as a parameter name in header files, since thatis a C++ keyword. These cases were introduced recently, in04fe805and586b98f.Since I'm an incurable neatnik, also rename these parameters in theunderlying function definitions. That's not really necessary perproject rules, but I don't like function declarations that don'tquite agree with the underlying definitions.Per src/tools/pginclude/cpluspluscheck.
1 parenta968d54 commiteaf0380

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

‎src/backend/optimizer/plan/setrefs.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2589,13 +2589,13 @@ record_plan_function_dependency(PlannerInfo *root, Oid funcid)
25892589
* someday fix_expr_common might call it.
25902590
*/
25912591
void
2592-
record_plan_type_dependency(PlannerInfo*root,Oidtypeid)
2592+
record_plan_type_dependency(PlannerInfo*root,Oidtypid)
25932593
{
25942594
/*
25952595
* As in record_plan_function_dependency, ignore the possibility that
25962596
* someone would change a built-in domain.
25972597
*/
2598-
if (typeid >= (Oid)FirstBootstrapObjectId)
2598+
if (typid >= (Oid)FirstBootstrapObjectId)
25992599
{
26002600
PlanInvalItem*inval_item=makeNode(PlanInvalItem);
26012601

@@ -2606,7 +2606,7 @@ record_plan_type_dependency(PlannerInfo *root, Oid typeid)
26062606
*/
26072607
inval_item->cacheId=TYPEOID;
26082608
inval_item->hashValue=GetSysCacheHashValue1(TYPEOID,
2609-
ObjectIdGetDatum(typeid));
2609+
ObjectIdGetDatum(typid));
26102610

26112611
root->glob->invalItems=lappend(root->glob->invalItems,inval_item);
26122612
}

‎src/backend/utils/adt/varlena.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ typedef struct
6969
intlast_returned;/* Last comparison result (cache) */
7070
boolcache_blob;/* Does buf2 contain strxfrm() blob, etc? */
7171
boolcollate_c;
72-
Oidtypeid;/* Actual datatype (text/bpchar/bytea/name) */
72+
Oidtypid;/* Actual datatype (text/bpchar/bytea/name) */
7373
hyperLogLogStateabbr_card;/* Abbreviated key cardinality state */
7474
hyperLogLogStatefull_card;/* Full key cardinality state */
7575
doubleprop_card;/* Required cardinality proportion */
@@ -1835,7 +1835,7 @@ bttextsortsupport(PG_FUNCTION_ARGS)
18351835
* this will not work with any other collation, though.
18361836
*/
18371837
void
1838-
varstr_sortsupport(SortSupportssup,Oidtypeid,Oidcollid)
1838+
varstr_sortsupport(SortSupportssup,Oidtypid,Oidcollid)
18391839
{
18401840
boolabbreviate=ssup->abbreviate;
18411841
boolcollate_c= false;
@@ -1857,9 +1857,9 @@ varstr_sortsupport(SortSupport ssup, Oid typeid, Oid collid)
18571857
*/
18581858
if (lc_collate_is_c(collid))
18591859
{
1860-
if (typeid==BPCHAROID)
1860+
if (typid==BPCHAROID)
18611861
ssup->comparator=bpcharfastcmp_c;
1862-
elseif (typeid==NAMEOID)
1862+
elseif (typid==NAMEOID)
18631863
{
18641864
ssup->comparator=namefastcmp_c;
18651865
/* Not supporting abbreviation with type NAME, for now */
@@ -1910,7 +1910,7 @@ varstr_sortsupport(SortSupport ssup, Oid typeid, Oid collid)
19101910
/*
19111911
* We use varlenafastcmp_locale except for type NAME.
19121912
*/
1913-
if (typeid==NAMEOID)
1913+
if (typid==NAMEOID)
19141914
{
19151915
ssup->comparator=namefastcmp_locale;
19161916
/* Not supporting abbreviation with type NAME, for now */
@@ -1983,7 +1983,7 @@ varstr_sortsupport(SortSupport ssup, Oid typeid, Oid collid)
19831983
*/
19841984
sss->cache_blob= true;
19851985
sss->collate_c=collate_c;
1986-
sss->typeid=typeid;
1986+
sss->typid=typid;
19871987
ssup->ssup_extra=sss;
19881988

19891989
/*
@@ -2160,7 +2160,7 @@ varstrfastcmp_locale(char *a1p, int len1, char *a2p, int len2, SortSupport ssup)
21602160
return0;
21612161
}
21622162

2163-
if (sss->typeid==BPCHAROID)
2163+
if (sss->typid==BPCHAROID)
21642164
{
21652165
/* Get true number of bytes, ignoring trailing spaces */
21662166
len1=bpchartruelen(a1p,len1);
@@ -2333,7 +2333,7 @@ varstr_abbrev_convert(Datum original, SortSupport ssup)
23332333
len=VARSIZE_ANY_EXHDR(authoritative);
23342334

23352335
/* Get number of bytes, ignoring trailing spaces */
2336-
if (sss->typeid==BPCHAROID)
2336+
if (sss->typid==BPCHAROID)
23372337
len=bpchartruelen(authoritative_data,len);
23382338

23392339
/*

‎src/include/optimizer/planmain.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ extern bool innerrel_is_unique(PlannerInfo *root,
118118
*/
119119
externPlan*set_plan_references(PlannerInfo*root,Plan*plan);
120120
externvoidrecord_plan_function_dependency(PlannerInfo*root,Oidfuncid);
121-
externvoidrecord_plan_type_dependency(PlannerInfo*root,Oidtypeid);
121+
externvoidrecord_plan_type_dependency(PlannerInfo*root,Oidtypid);
122122
externvoidextract_query_dependencies(Node*query,
123123
List**relationOids,
124124
List**invalItems,

‎src/include/utils/varlena.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include"utils/sortsupport.h"
1818

1919
externintvarstr_cmp(constchar*arg1,intlen1,constchar*arg2,intlen2,Oidcollid);
20-
externvoidvarstr_sortsupport(SortSupportssup,Oidtypeid,Oidcollid);
20+
externvoidvarstr_sortsupport(SortSupportssup,Oidtypid,Oidcollid);
2121
externintvarstr_levenshtein(constchar*source,intslen,
2222
constchar*target,inttlen,
2323
intins_c,intdel_c,intsub_c,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp