Thread
-
Re: Sequence Access Methods, round two
zengman <zengman@halodbtech.com> — 2025-12-23T07:46:11Z
Additionally, it may be necessary to replace the line `PG_MODULE_MAGIC`; in `contrib/snowflake/snowflake.c` with the following code block: ``` PG_MODULE_MAGIC_EXT( .name = "snowflake", .version = PG_VERSION ); ``` In addition, the memory allocation code within the `snowflake_get` function: ``` nulls = palloc0(sizeof(bool) * tupdesc->natts); values = palloc0(sizeof(Datum) * tupdesc->natts); ``` should be replaced with: ``` nulls = palloc0_array(sizeof(bool), tupdesc->natts); values = palloc0_array(sizeof(Datum), tupdesc->natts); ``` -- Regards, Man Zeng www.openhalo.org