Re: Sequence Access Methods, round two

zengman <zengman@halodbtech.com>

From: zengman <zengman@halodbtech.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: pgsql-hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-12-23T07:46:11Z
Lists: pgsql-hackers
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