Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: Improved HeapTuple support #502

Closed
Hoverbear opened this issue Mar 23, 2022 · 2 comments · Fixed by #532 or #751
Closed

RFC: Improved HeapTuple support #502

Hoverbear opened this issue Mar 23, 2022 · 2 comments · Fixed by #532 or #751

Comments

@Hoverbear
Copy link
Contributor

Right now we have basic support for HeapTuple, but we'd like to expand on it.

Currently these types are quite basic:

https://github.com/tcdi/pgx/blob/a96c1b75380cfda210029bc4671b342c4e904fe7/pgx/src/spi.rs#L69-L79

We'd like to be able to look up attributes via an ordinal index, or via attribute name.

This is partially to eventually support triggers (which OLD and NEW are heaptuples).

We'd like it for there to be a way to (without causing unnecessary copies) view the data inside these heaptuples, as well as bindings to their internal postgres counterparts which could mutate and/or create these heaptuples.

It may be that we need to distinct types, but we'd like to explore having one common type.

@ccleve
Copy link
Contributor

ccleve commented Mar 30, 2022

See #326

Yes, this would be very helpful. The zero-copy goal is also important. I would probably not use an implementation that merely copied a HeapTuple into a Map except in cases where performance did not matter.

@Hoverbear Hoverbear linked a pull request Apr 6, 2022 that will close this issue
@Hoverbear
Copy link
Contributor Author

This is in the develop-v0.5.0 branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants