Re: Sequence Access Methods, round two - Mailing list pgsql-hackers

From zengman
Subject Re: Sequence Access Methods, round two
Date
Msg-id tencent_1153C6FF0099AB333AEC7C36@qq.com
Whole thread Raw
In response to Re: Sequence Access Methods, round two  ("zengman" <zengman@halodbtech.com>)
List pgsql-hackers
Additionally, it may be necessary to replace the line `PG_MODULE_MAGIC`; in `contrib/snowflake/snowflake.c` with the
followingcode 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

pgsql-hackers by date:

Previous
From: "zengman"
Date:
Subject: Re: Sequence Access Methods, round two
Next
From: jian he
Date:
Subject: Re: CREATE TABLE LIKE INCLUDING POLICIES