Skip to content
This repository was archived by the owner on Apr 2, 2024. It is now read-only.

Clean up extension internals to make better use of pgx types and facilities #48

Closed
1 of 3 tasks
bitwalker opened this issue Dec 13, 2021 · 1 comment
Closed
1 of 3 tasks
Assignees
Labels
Infrastructure Improvements to the infrastructure we use to build the product (CI, libraries, etc.)

Comments

@bitwalker
Copy link
Contributor

bitwalker commented Dec 13, 2021

There are a few areas which could use some refactoring to make future changes easier and safer:

  • Implement Allocator API (via nightly) on top of Postgres MemoryContexts for the types of contexts the extension is used in
  • Remove Inner<T> type and use Box<T, A> and Vec<T, A> on top of custom allocators
  • Remove redundant wrapper types for things which have appropriate implementations already in pgx (bytea, TimestampTz)

We may want/need to upstream some or all of the first two items in the list, e.g. to allow using alloc types which are parameterized on the Allocator type to be used as arguments in function signatures. We should be able to proceed without that from what I've observed, but it would allow for a cleaner integration, and open the door to optimizations such as avoiding unnecessary copies when using Box or Vec as result types.

There are PRs coming for all of the above today/tomorrow which we can use to discuss the changes outlined above.

@bitwalker bitwalker added the Infrastructure Improvements to the infrastructure we use to build the product (CI, libraries, etc.) label Dec 13, 2021
@bitwalker bitwalker self-assigned this Dec 13, 2021
@JamesGuthrie
Copy link
Member

I think that all of these points will be covered when we start using PGX's aggregate support: #62. I would suggest closing this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Infrastructure Improvements to the infrastructure we use to build the product (CI, libraries, etc.)
Projects
None yet
Development

No branches or pull requests

2 participants