Hi all,
I'm tring to understand a part of code of postgres and I saw a line like this: "bms_is_subset(restrictinfo->right_relids,outerrelids)" (createplan.c, function get_switched_clauses() at ~/src/backend/optimizer/plan). I don't understand the data types of the the arguments of that function. The datatype of those arguments is Bitmapset, i.e. typedef struct Bitmapset { int nwords; bitmapword words[1]; }Bitmapset; (bitmapset.h at ~/src/include/nodes)
and bitmapword is: typedef unit32 bitmapword; (bitmapset.h at ~/src/include/nodes)
and the prototype of the function is: extern bool bms_is_subset(const Bitmapset *a, const Bitmapset *b); (bitmapset.h at ~/src/include/nodes)
The following is at the file bitmapset.h at dir ~/src/include/nodes) "A bitmap set can represent any set of nonnegative integers, although it is mainly intented for sets where the maximum value is not large, say at most a few hundred.By convention, a NULL pointer is always accepted by all operations to represent the empty set.(But beware that this is not the only representation of the empty set. Use bms_is_empty() in preference to testing for NULL.)"
Can someone explain to me please the datatype Bitmapset? I'm confused.
Thanks in advance!!! - martha
---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend