| From: | zengman <zengman(at)halodbtech(dot)com> |
|---|---|
| To: | Michael Paquier <michael(at)paquier(dot)xyz> |
| Cc: | pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Sequence Access Methods, round two |
| Date: | 2025-12-23 07:46:11 |
| Message-ID: | tencent_1153C6FF0099AB333AEC7C36@qq.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | jian he | 2025-12-23 07:47:00 | Re: CREATE TABLE LIKE INCLUDING POLICIES |
| Previous Message | zengman | 2025-12-23 07:26:20 | Re: Sequence Access Methods, round two |