mirror of
https://github.com/postgres/postgres.git
synced 2025-07-08 11:42:09 +03:00
Make Bitmapsets be valid Nodes.
Add a NodeTag field to struct Bitmapset. This is free because of alignment considerations on 64-bit hardware. While it adds some space on 32-bit machines, we aren't optimizing for that case anymore. The advantage is that data structures such as Lists of Bitmapsets are now first-class objects to the Node infrastructure, and don't require special-case code to handle. This patch includes removal of one such special case, in indxpath.c: bms_equal_any() can now be replaced by list_member(). There may be more existing code that could be simplified, but I didn't look very hard. We also get to drop the read_write_ignore annotations on a couple of RelOptInfo fields. The outfuncs/readfuncs support is arranged so that nothing changes in the string representation of a Bitmapset field; therefore, this doesn't need a catversion bump. Amit Langote and Tom Lane Discussion: https://postgr.es/m/109089.1668197158@sss.pgh.pa.us
This commit is contained in:
@ -194,6 +194,10 @@ nullable_string(const char *token, int length)
|
||||
|
||||
/*
|
||||
* _readBitmapset
|
||||
*
|
||||
* Note: this code is used in contexts where we know that a Bitmapset
|
||||
* is expected. There is equivalent code in nodeRead() that can read a
|
||||
* Bitmapset when we come across one in other contexts.
|
||||
*/
|
||||
static Bitmapset *
|
||||
_readBitmapset(void)
|
||||
@ -234,7 +238,8 @@ _readBitmapset(void)
|
||||
}
|
||||
|
||||
/*
|
||||
* for use by extensions which define extensible nodes
|
||||
* We export this function for use by extensions that define extensible nodes.
|
||||
* That's somewhat historical, though, because calling nodeRead() will work.
|
||||
*/
|
||||
Bitmapset *
|
||||
readBitmapset(void)
|
||||
|
Reference in New Issue
Block a user