Обсуждение: Proposal for adding an example "expanded" data type to contrib

Поиск
Список
Период
Сортировка

Proposal for adding an example "expanded" data type to contrib

От
Michel Pelletier
Дата:
Hello,

Expanded data types (types that have a different in-memory working representation than on disk) are pretty essential to a couple of projects that I work on, and while the prose documentation is great at explaining the rationale and technical overview, there isn't a complete, self-contained, simple example of an expanded data type.  Readers of the documentation are encouraged to study the array type code.

To wrap my own head around it, and to have a sort of template to quickly spin up future expanded types, I wrote a simple extension that does nothing useful other than show how to create and handle an expanded type.


I posted this last week to psql-general, and Pavel Stehule suggested it would be a good candidate for inclusion in the contrib collection and that I write this proposal to suggest the extension get into the next commit fest.

I have not contributed to the core of postgres in the past so please excuse my ignorance on the process.  Does anyone have any comments or objections to me pushing this process further along?

-Michel

Re: Proposal for adding an example "expanded" data type to contrib

От
Alvaro Herrera
Дата:
On 2021-Nov-08, Michel Pelletier wrote:

> I posted this last week to psql-general, and Pavel Stehule suggested it
> would be a good candidate for inclusion in the contrib collection and that
> I write this proposal to suggest the extension get into the next commit
> fest.

Hmm, I think src/test/modules/ would be a better place for it than
contrib/ -- alongside plsample, which has a similar intention.

-- 
Álvaro Herrera              Valdivia, Chile  —  https://www.EnterpriseDB.com/



Re: Proposal for adding an example "expanded" data type to contrib

От
Michel Pelletier
Дата:
On Mon, Nov 8, 2021 at 8:07 AM Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
On 2021-Nov-08, Michel Pelletier wrote:

> I posted this last week to psql-general, and Pavel Stehule suggested it
> would be a good candidate for inclusion in the contrib collection and that
> I write this proposal to suggest the extension get into the next commit
> fest.

Hmm, I think src/test/modules/ would be a better place for it than
contrib/ -- alongside plsample, which has a similar intention.

Ah excellent suggestion, that dir had slipped my mind.  I see the readme says:

"src/test/modules contains PostgreSQL extensions that are primarily or entirely intended for testing PostgreSQL and/or to serve as example code."

so that seems quite appropriate, thanks!

-Michel


--
Álvaro Herrera              Valdivia, Chile  —  https://www.EnterpriseDB.com/