File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -498,22 +498,21 @@ lquery_out(PG_FUNCTION_ARGS)
498
498
* ptr ;
499
499
int i ,
500
500
j ,
501
- totallen = 0 ;
501
+ totallen = 1 ;
502
502
lquery_level * curqlevel ;
503
503
lquery_variant * curtlevel ;
504
504
505
505
curqlevel = LQUERY_FIRST (in );
506
506
for (i = 0 ; i < in -> numlevel ; i ++ )
507
507
{
508
+ totallen ++ ;
508
509
if (curqlevel -> numvar )
509
- totallen = (curqlevel -> numvar * 4 ) + 1 + curqlevel -> totallen ;
510
+ totallen += 1 + (curqlevel -> numvar * 4 ) + curqlevel -> totallen ;
510
511
else
511
- totallen = 2 * 11 + 4 ;
512
- totallen ++ ;
512
+ totallen += 2 * 11 + 4 ;
513
513
curqlevel = LQL_NEXT (curqlevel );
514
514
}
515
515
516
-
517
516
ptr = buf = (char * ) palloc (totallen );
518
517
curqlevel = LQUERY_FIRST (in );
519
518
for (i = 0 ; i < in -> numlevel ; i ++ )
You can’t perform that action at this time.
0 commit comments