File tree 2 files changed +19
-0
lines changed
2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 22
22
#include <ctype.h>
23
23
24
24
#include "common/string.h"
25
+ #include "nodes/bitmapset.h"
25
26
#include "nodes/pg_list.h"
26
27
#include "nodes/readfuncs.h"
27
28
#include "nodes/value.h"
@@ -478,3 +479,20 @@ nodeRead(const char *token, int tok_len)
478
479
479
480
return (void * ) result ;
480
481
}
482
+
483
+ /*
484
+ * Helper function for Babelfish to build Bitmapset from string.
485
+ */
486
+ Bitmapset *
487
+ stringToBms (const char * str )
488
+ {
489
+ Bitmapset * ret ;
490
+ const char * save_strtok ;
491
+
492
+ save_strtok = pg_strtok_ptr ;
493
+ pg_strtok_ptr = str ; /* point pg_strtok at the string to read */
494
+
495
+ ret = readBitmapset ();
496
+ pg_strtok_ptr = save_strtok ;
497
+ return ret ;
498
+ }
Original file line number Diff line number Diff line change @@ -654,6 +654,7 @@ extern bool *readBoolCols(int numCols);
654
654
extern int * readIntCols (int numCols );
655
655
extern Oid * readOidCols (int numCols );
656
656
extern int16 * readAttrNumberCols (int numCols );
657
+ extern struct Bitmapset * stringToBms (const char * str );
657
658
658
659
/*
659
660
* nodes/copyfuncs.c
You can’t perform that action at this time.
0 commit comments