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

AnyElement oid is always zero #735

Closed
syvb opened this issue Oct 4, 2022 · 1 comment · Fixed by #751
Closed

AnyElement oid is always zero #735

syvb opened this issue Oct 4, 2022 · 1 comment · Fixed by #751

Comments

@syvb
Copy link
Contributor

syvb commented Oct 4, 2022

I'm trying to upgrade an extension that uses AnyElement to the 0.5 beta, and it looks like the AnyElement::oid of the type in the AnyElement is always zero, when an AnyElement is passed in from Postgres. AnyElement::oid worked fine in 0.4.5.

Here's a simplified test case with a failing test: https://gist.github.com/Smittyvb/b1ee0bffcf413b85cefe1351caedfaf6

@syvb syvb changed the title AnyElement oid is always zero? AnyElement oid is always zero Oct 4, 2022
@workingjubilee
Copy link
Member

workingjubilee commented Oct 4, 2022

I'll try to find out if this can be fixed but if you have FunctionCallInfo you want to break down (a very likely situation for needing AnyElement in the first place) then the workaround for now is to use pgx::fcinfo::get_getarg_typepg_getarg_type.

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

Successfully merging a pull request may close this issue.

2 participants