@@ -221,7 +221,7 @@ jsonPathToCstring(StringInfo out, JsonPath *in, int estimated_len)
221
221
enlargeStringInfo (out ,estimated_len );
222
222
223
223
if (!(in -> header & JSONPATH_LAX ))
224
- appendBinaryStringInfo (out ,"strict " , 7 );
224
+ appendStringInfoString (out ,"strict " );
225
225
226
226
jspInit (& v ,in );
227
227
printJsonPathItem (out ,& v , false, true);
@@ -542,9 +542,9 @@ printJsonPathItem(StringInfo buf, JsonPathItem *v, bool inKey,
542
542
break ;
543
543
case jpiBool :
544
544
if (jspGetBool (v ))
545
- appendBinaryStringInfo (buf ,"true" , 4 );
545
+ appendStringInfoString (buf ,"true" );
546
546
else
547
- appendBinaryStringInfo (buf ,"false" , 5 );
547
+ appendStringInfoString (buf ,"false" );
548
548
break ;
549
549
case jpiAnd :
550
550
case jpiOr :
@@ -585,13 +585,13 @@ printJsonPathItem(StringInfo buf, JsonPathItem *v, bool inKey,
585
585
operationPriority (elem .type ) <=
586
586
operationPriority (v -> type ));
587
587
588
- appendBinaryStringInfo (buf ," like_regex " , 12 );
588
+ appendStringInfoString (buf ," like_regex " );
589
589
590
590
escape_json (buf ,v -> content .like_regex .pattern );
591
591
592
592
if (v -> content .like_regex .flags )
593
593
{
594
- appendBinaryStringInfo (buf ," flag \"" , 7 );
594
+ appendStringInfoString (buf ," flag \"" );
595
595
596
596
if (v -> content .like_regex .flags & JSP_REGEX_ICASE )
597
597
appendStringInfoChar (buf ,'i' );
@@ -623,13 +623,13 @@ printJsonPathItem(StringInfo buf, JsonPathItem *v, bool inKey,
623
623
appendStringInfoChar (buf ,')' );
624
624
break ;
625
625
case jpiFilter :
626
- appendBinaryStringInfo (buf ,"?(" , 2 );
626
+ appendStringInfoString (buf ,"?(" );
627
627
jspGetArg (v ,& elem );
628
628
printJsonPathItem (buf ,& elem , false, false);
629
629
appendStringInfoChar (buf ,')' );
630
630
break ;
631
631
case jpiNot :
632
- appendBinaryStringInfo (buf ,"!(" , 2 );
632
+ appendStringInfoString (buf ,"!(" );
633
633
jspGetArg (v ,& elem );
634
634
printJsonPathItem (buf ,& elem , false, false);
635
635
appendStringInfoChar (buf ,')' );
@@ -638,10 +638,10 @@ printJsonPathItem(StringInfo buf, JsonPathItem *v, bool inKey,
638
638
appendStringInfoChar (buf ,'(' );
639
639
jspGetArg (v ,& elem );
640
640
printJsonPathItem (buf ,& elem , false, false);
641
- appendBinaryStringInfo (buf ,") is unknown" , 12 );
641
+ appendStringInfoString (buf ,") is unknown" );
642
642
break ;
643
643
case jpiExists :
644
- appendBinaryStringInfo (buf ,"exists (" , 8 );
644
+ appendStringInfoString (buf ,"exists (" );
645
645
jspGetArg (v ,& elem );
646
646
printJsonPathItem (buf ,& elem , false, false);
647
647
appendStringInfoChar (buf ,')' );
@@ -655,10 +655,10 @@ printJsonPathItem(StringInfo buf, JsonPathItem *v, bool inKey,
655
655
appendStringInfoChar (buf ,'$' );
656
656
break ;
657
657
case jpiLast :
658
- appendBinaryStringInfo (buf ,"last" , 4 );
658
+ appendStringInfoString (buf ,"last" );
659
659
break ;
660
660
case jpiAnyArray :
661
- appendBinaryStringInfo (buf ,"[*]" , 3 );
661
+ appendStringInfoString (buf ,"[*]" );
662
662
break ;
663
663
case jpiAnyKey :
664
664
if (inKey )
@@ -680,7 +680,7 @@ printJsonPathItem(StringInfo buf, JsonPathItem *v, bool inKey,
680
680
681
681
if (range )
682
682
{
683
- appendBinaryStringInfo (buf ," to " , 4 );
683
+ appendStringInfoString (buf ," to " );
684
684
printJsonPathItem (buf ,& to , false, false);
685
685
}
686
686
}
@@ -692,7 +692,7 @@ printJsonPathItem(StringInfo buf, JsonPathItem *v, bool inKey,
692
692
693
693
if (v -> content .anybounds .first == 0 &&
694
694
v -> content .anybounds .last == PG_UINT32_MAX )
695
- appendBinaryStringInfo (buf ,"**" , 2 );
695
+ appendStringInfoString (buf ,"**" );
696
696
else if (v -> content .anybounds .first == v -> content .anybounds .last )
697
697
{
698
698
if (v -> content .anybounds .first == PG_UINT32_MAX )
@@ -713,25 +713,25 @@ printJsonPathItem(StringInfo buf, JsonPathItem *v, bool inKey,
713
713
v -> content .anybounds .last );
714
714
break ;
715
715
case jpiType :
716
- appendBinaryStringInfo (buf ,".type()" , 7 );
716
+ appendStringInfoString (buf ,".type()" );
717
717
break ;
718
718
case jpiSize :
719
- appendBinaryStringInfo (buf ,".size()" , 7 );
719
+ appendStringInfoString (buf ,".size()" );
720
720
break ;
721
721
case jpiAbs :
722
- appendBinaryStringInfo (buf ,".abs()" , 6 );
722
+ appendStringInfoString (buf ,".abs()" );
723
723
break ;
724
724
case jpiFloor :
725
- appendBinaryStringInfo (buf ,".floor()" , 8 );
725
+ appendStringInfoString (buf ,".floor()" );
726
726
break ;
727
727
case jpiCeiling :
728
- appendBinaryStringInfo (buf ,".ceiling()" , 10 );
728
+ appendStringInfoString (buf ,".ceiling()" );
729
729
break ;
730
730
case jpiDouble :
731
- appendBinaryStringInfo (buf ,".double()" , 9 );
731
+ appendStringInfoString (buf ,".double()" );
732
732
break ;
733
733
case jpiDatetime :
734
- appendBinaryStringInfo (buf ,".datetime(" , 10 );
734
+ appendStringInfoString (buf ,".datetime(" );
735
735
if (v -> content .arg )
736
736
{
737
737
jspGetArg (v ,& elem );
@@ -740,7 +740,7 @@ printJsonPathItem(StringInfo buf, JsonPathItem *v, bool inKey,
740
740
appendStringInfoChar (buf ,')' );
741
741
break ;
742
742
case jpiKeyValue :
743
- appendBinaryStringInfo (buf ,".keyvalue()" , 11 );
743
+ appendStringInfoString (buf ,".keyvalue()" );
744
744
break ;
745
745
default :
746
746
elog (ERROR ,"unrecognized jsonpath item type: %d" ,v -> type );