You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just have the pgx object be a Rust wrapper around the pg data structure and
enable casting?
Then over time more functionality can be added to the pgx object as needed.
Although that would mean the pgx object couldn’t be used in threads (as
they can’t call the cast, as it calls pg)
I'm currently writing an agg which uses a Timestamp as part of it's state (I'm using State = Internal).
It looks like on each state function call the timestamp is pushed through
pg_sys::timestamp2tm
to convert to Rust (POSIX). This is pretty slow.For a million records I'm seeing 149ms with it the call vs. 70ms without it enabled (tested by returning a static timestamp).
Not sure what could be done here - maybe using a custom implementation which mirrors the PG one's format?
The text was updated successfully, but these errors were encountered: