-
Notifications
You must be signed in to change notification settings - Fork 2
Suggestion: functions that make use of 'any' pseudotype #5
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
Labels
Comments
Thank you for the suggestion! Didn't think about it. I will try to implement it. |
You might find
https://github.com/decibel/variant/blob/master/src/variant.c#L107-L109,
https://github.com/decibel/variant/blob/master/src/variant.c#L1072 and
some of
https://github.com/decibel/variant/blob/master/src/variant.c#L942
helpful. Feel free to ping me with questions.
|
Thank you for useful links! CREATE FUNCTION pgv_get(package text, name text, strict bool default true)
RETURNS anynonarray
AS 'MODULE_PATHNAME', 'variable_get_any'
LANGUAGE C VOLATILE; I get the error:
And the documentation confirms it. |
Yeah, the trick is to get the user to pass in a type, even if the
function doesn't actually need that. You can see an example of that in
4.2.2 at http://pgxn.org/dist/test_factory/doc/test_factory.html
|
za-arthur
pushed a commit
that referenced
this issue
Dec 18, 2016
Thank you for your help! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just a suggestion... if you used the 'any' pseudotype (or one of it's variants), you could eliminate a lot of code and allow users to store any arbitrary type that they wanted.
The text was updated successfully, but these errors were encountered: