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

Commit28a08fd

Browse files
committed
I have this annoying habit (among others) of putting
%ud in a printf format strings instead of just %u.There were three occurances of this in catalog_utils.c,two in parser.c and one in rewriteSupport.c in the oidpatch that I submitted and was applied. They won't crashanything, but the error messages will have a 'd' after theOid. Annoying, but none are db-threatening.Sorry about that folks...I'll be more careful in the future...Darren King
1 parentc5aaba2 commit28a08fd

File tree

3 files changed

+33
-33
lines changed

3 files changed

+33
-33
lines changed

‎src/backend/nodes/outfuncs.c

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.4 1996/12/11 03:17:42 bryanh Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.5 1996/12/2617:46:56 momjian Exp $
1111
*
1212
* NOTES
1313
* Every (plan) node in POSTGRES has an associated "out" routine which
@@ -247,13 +247,13 @@ _outMergeJoin(StringInfo str, MergeJoin *node)
247247
appendStringInfo(str,buf);
248248
_outNode(str,node->mergeclauses);
249249

250-
sprintf(buf," :mergesortop %ud",node->mergesortop);
250+
sprintf(buf," :mergesortop %u",node->mergesortop);
251251
appendStringInfo(str,buf);
252252

253-
sprintf(buf," :mergerightorder %ud",node->mergerightorder[0]);
253+
sprintf(buf," :mergerightorder %u",node->mergerightorder[0]);
254254
appendStringInfo(str,buf);
255255

256-
sprintf(buf," :mergeleftorder %ud",node->mergeleftorder[0]);
256+
sprintf(buf," :mergeleftorder %u",node->mergeleftorder[0]);
257257
appendStringInfo(str,buf);
258258
}
259259

@@ -273,7 +273,7 @@ _outHashJoin(StringInfo str, HashJoin *node)
273273
appendStringInfo(str,buf);
274274
_outNode(str,node->hashclauses);
275275

276-
sprintf(buf," :hashjoinop %ud",node->hashjoinop);
276+
sprintf(buf," :hashjoinop %u",node->hashjoinop);
277277
appendStringInfo(str,buf);
278278
sprintf(buf," :hashjointable 0x%x", (int)node->hashjointable);
279279
appendStringInfo(str,buf);
@@ -357,7 +357,7 @@ _outTemp(StringInfo str, Temp *node)
357357
appendStringInfo(str,buf);
358358
_outPlanInfo(str, (Plan*)node);
359359

360-
sprintf(buf," :tempid %ud",node->tempid);
360+
sprintf(buf," :tempid %u",node->tempid);
361361
appendStringInfo(str,buf);
362362
sprintf(buf," :keycount %d",node->keycount);
363363
appendStringInfo(str,buf);
@@ -376,7 +376,7 @@ _outSort(StringInfo str, Sort *node)
376376
appendStringInfo(str,buf);
377377
_outPlanInfo(str, (Plan*)node);
378378

379-
sprintf(buf," :tempid %ud",node->tempid);
379+
sprintf(buf," :tempid %u",node->tempid);
380380
appendStringInfo(str,buf);
381381
sprintf(buf," :keycount %d",node->keycount);
382382
appendStringInfo(str,buf);
@@ -425,7 +425,7 @@ _outUnique(StringInfo str, Unique *node)
425425
appendStringInfo(str,buf);
426426
_outPlanInfo(str, (Plan*)node);
427427

428-
sprintf(buf," :tempid %ud",node->tempid);
428+
sprintf(buf," :tempid %u",node->tempid);
429429
appendStringInfo(str,buf);
430430
sprintf(buf," :keycount %d",node->keycount);
431431
appendStringInfo(str,buf);
@@ -497,7 +497,7 @@ _outResdom(StringInfo str, Resdom *node)
497497
appendStringInfo(str,buf);
498498
sprintf(buf," :resno %hd",node->resno);
499499
appendStringInfo(str,buf);
500-
sprintf(buf," :restype %ud",node->restype);
500+
sprintf(buf," :restype %u",node->restype);
501501
appendStringInfo(str,buf);
502502
sprintf(buf," :reslen %d",node->reslen);
503503
appendStringInfo(str,buf);
@@ -506,7 +506,7 @@ _outResdom(StringInfo str, Resdom *node)
506506
appendStringInfo(str,buf);
507507
sprintf(buf," :reskey %d",node->reskey);
508508
appendStringInfo(str,buf);
509-
sprintf(buf," :reskeyop %ud",node->reskeyop);
509+
sprintf(buf," :reskeyop %u",node->reskeyop);
510510
appendStringInfo(str,buf);
511511
sprintf(buf," :resjunk %d",node->resjunk);
512512
appendStringInfo(str,buf);
@@ -553,7 +553,7 @@ _outExpr(StringInfo str, Expr *node)
553553
sprintf(buf,"EXPR");
554554
appendStringInfo(str,buf);
555555

556-
sprintf(buf," :typeOid %d",node->typeOid);
556+
sprintf(buf," :typeOid %u",node->typeOid);
557557
appendStringInfo(str,buf);
558558
switch(node->opType) {
559559
caseOP_EXPR:
@@ -596,7 +596,7 @@ _outVar(StringInfo str, Var *node)
596596
appendStringInfo(str,buf);
597597
sprintf(buf," :varattno %hd",node->varattno);
598598
appendStringInfo(str,buf);
599-
sprintf(buf," :vartype %d",node->vartype);
599+
sprintf(buf," :vartype %u",node->vartype);
600600
appendStringInfo(str,buf);
601601
sprintf(buf," :varnoold %d",node->varnoold);
602602
appendStringInfo(str,buf);
@@ -614,7 +614,7 @@ _outConst(StringInfo str, Const *node)
614614

615615
sprintf(buf,"CONST");
616616
appendStringInfo(str,buf);
617-
sprintf(buf," :consttype %d",node->consttype);
617+
sprintf(buf," :consttype %u",node->consttype);
618618
appendStringInfo(str,buf);
619619
sprintf(buf," :constlen %hd",node->constlen);
620620
appendStringInfo(str,buf);
@@ -645,9 +645,9 @@ _outAggreg(StringInfo str, Aggreg *node)
645645
appendStringInfo(str,buf);
646646
sprintf(buf," :aggname \"%.*s\"",NAMEDATALEN, (char*)node->aggname);
647647
appendStringInfo(str,buf);
648-
sprintf(buf," :basetype %d",node->basetype);
648+
sprintf(buf," :basetype %u",node->basetype);
649649
appendStringInfo(str,buf);
650-
sprintf(buf," :aggtype %d",node->aggtype);
650+
sprintf(buf," :aggtype %u",node->aggtype);
651651
appendStringInfo(str,buf);
652652
sprintf(buf," :aggno %d",node->aggno);
653653
appendStringInfo(str,buf);
@@ -667,7 +667,7 @@ _outArray(StringInfo str, Array *node)
667667
inti;
668668
sprintf(buf,"ARRAY");
669669
appendStringInfo(str,buf);
670-
sprintf(buf," :arrayelemtype %d",node->arrayelemtype);
670+
sprintf(buf," :arrayelemtype %u",node->arrayelemtype);
671671
appendStringInfo(str,buf);
672672
sprintf(buf," :arrayelemlength %d",node->arrayelemlength);
673673
appendStringInfo(str,buf);
@@ -701,7 +701,7 @@ _outArrayRef(StringInfo str, ArrayRef *node)
701701

702702
sprintf(buf,"ARRAYREF");
703703
appendStringInfo(str,buf);
704-
sprintf(buf," :refelemtype %d",node->refelemtype);
704+
sprintf(buf," :refelemtype %u",node->refelemtype);
705705
appendStringInfo(str,buf);
706706
sprintf(buf," :refattrlength %d",node->refattrlength);
707707
appendStringInfo(str,buf);
@@ -737,9 +737,9 @@ _outFunc(StringInfo str, Func *node)
737737

738738
sprintf(buf,"FUNC");
739739
appendStringInfo(str,buf);
740-
sprintf(buf," :funcid %d",node->funcid);
740+
sprintf(buf," :funcid %u",node->funcid);
741741
appendStringInfo(str,buf);
742-
sprintf(buf," :functype %d",node->functype);
742+
sprintf(buf," :functype %u",node->functype);
743743
appendStringInfo(str,buf);
744744
sprintf(buf," :funcisindex %s",
745745
(node->funcisindex ?"true" :"nil"));
@@ -766,11 +766,11 @@ _outOper(StringInfo str, Oper *node)
766766

767767
sprintf(buf,"OPER");
768768
appendStringInfo(str,buf);
769-
sprintf(buf," :opno %d",node->opno);
769+
sprintf(buf," :opno %u",node->opno);
770770
appendStringInfo(str,buf);
771-
sprintf(buf," :opid %d",node->opid);
771+
sprintf(buf," :opid %u",node->opid);
772772
appendStringInfo(str,buf);
773-
sprintf(buf," :opresulttype %d",node->opresulttype);
773+
sprintf(buf," :opresulttype %u",node->opresulttype);
774774
appendStringInfo(str,buf);
775775

776776
}
@@ -791,7 +791,7 @@ _outParam(StringInfo str, Param *node)
791791
appendStringInfo(str,buf);
792792
sprintf(buf," :paramname \"%.*s\"",NAMEDATALEN,node->paramname);
793793
appendStringInfo(str,buf);
794-
sprintf(buf," :paramtype %d",node->paramtype);
794+
sprintf(buf," :paramtype %u",node->paramtype);
795795
appendStringInfo(str,buf);
796796

797797
appendStringInfo(str," :param_tlist ");
@@ -943,7 +943,7 @@ _outRangeTblEntry(StringInfo str, RangeTblEntry *node)
943943
((node->refname) ? ((char*)node->refname) :"null"));
944944
appendStringInfo(str,buf);
945945

946-
sprintf(buf," :relid %d ",node->relid);
946+
sprintf(buf," :relid %u ",node->relid);
947947
appendStringInfo(str,buf);
948948
}
949949

@@ -1265,7 +1265,7 @@ _outCInfo(StringInfo str, CInfo *node)
12651265
appendStringInfo(str,buf);
12661266
_outNode(str,node->mergesortorder);
12671267

1268-
sprintf(buf," :hashjoinoperator %d",node->hashjoinoperator);
1268+
sprintf(buf," :hashjoinoperator %u",node->hashjoinoperator);
12691269
appendStringInfo(str,buf);
12701270

12711271
}
@@ -1305,7 +1305,7 @@ _outHInfo(StringInfo str, HInfo *node)
13051305

13061306
sprintf(buf," :hashop ");
13071307
appendStringInfo(str,buf);
1308-
sprintf(buf,"%d",node->hashop);
1308+
sprintf(buf,"%u",node->hashop);
13091309
appendStringInfo(str,buf);
13101310

13111311
sprintf(buf," :jmkeys ");

‎src/backend/parser/catalog_utils.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
*
88
* IDENTIFICATION
9-
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/catalog_utils.c,v 1.13 1996/12/11 03:17:49 bryanh Exp $
9+
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/catalog_utils.c,v 1.14 1996/12/2617:47:41 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -1397,7 +1397,7 @@ typeid_get_retinfunc(Oid type_id)
13971397
0,0,0);
13981398
if ( !HeapTupleIsValid (typeTuple ))
13991399
elog(WARN,
1400-
"typeid_get_retinfunc: Invalid type - oid = %ud",
1400+
"typeid_get_retinfunc: Invalid type - oid = %u",
14011401
type_id);
14021402

14031403
type= (TypeTupleForm)GETSTRUCT(typeTuple);
@@ -1415,7 +1415,7 @@ typeid_get_relid(Oid type_id)
14151415
ObjectIdGetDatum(type_id),
14161416
0,0,0);
14171417
if ( !HeapTupleIsValid (typeTuple ))
1418-
elog(WARN,"typeid_get_relid: Invalid type - oid = %ud ",type_id);
1418+
elog(WARN,"typeid_get_relid: Invalid type - oid = %u ",type_id);
14191419

14201420
type= (TypeTupleForm)GETSTRUCT(typeTuple);
14211421
infunc=type->typrelid;
@@ -1441,7 +1441,7 @@ get_typelem(Oid type_id)
14411441
if (!(typeTuple=SearchSysCacheTuple(TYPOID,
14421442
ObjectIdGetDatum(type_id),
14431443
0,0,0))) {
1444-
elog (WARN ,"type id lookup of %ud failed",type_id);
1444+
elog (WARN ,"type id lookup of %u failed",type_id);
14451445
}
14461446
type= (TypeTupleForm)GETSTRUCT(typeTuple);
14471447

‎src/backend/parser/parser.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
*
88
* IDENTIFICATION
9-
* $Header: /cvsroot/pgsql/src/backend/parser/parser.c,v 1.15 1996/12/07 04:38:11 momjian Exp $
9+
* $Header: /cvsroot/pgsql/src/backend/parser/parser.c,v 1.16 1996/12/26 17:47:42 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -357,7 +357,7 @@ parser_typecast2(Node *expr, Oid exprType, Type tp, int typlen)
357357
const_string= (char*)textout((structvarlena*)const_string);
358358
break;
359359
default:
360-
elog(WARN,"unknown type %ud ",exprType);
360+
elog(WARN,"unknown type %u ",exprType);
361361
}
362362

363363
if (!exprType) {
@@ -405,7 +405,7 @@ parser_typecast2(Node *expr, Oid exprType, Type tp, int typlen)
405405
0/*was omitted*/,
406406
0/* not a set */);
407407
/*
408-
printf("adt %s : %ud %d %d\n",CString(expr),typeid(tp) ,
408+
printf("adt %s : %u %d %d\n",CString(expr),typeid(tp) ,
409409
len,cp);
410410
*/
411411
if (string_palloced)pfree(const_string);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp