-
Notifications
You must be signed in to change notification settings - Fork 93
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
How to call udf of pg and handle jsonb return value? #67
Comments
json data should automatically be decoded to a lua table as long as the type of the value is correct coming from postgres. Are you sure it's not accidentally a string when being returned? |
below is a udf example in my pg database, I want the return value is json or string data type after call udf in lua: |
Automatically decoded json to lua table is acceptable. But it's better to provide 2 function and let user choose return type is string or lua table. |
You can cast the value to a string from postgres using If you want to disable json deserialization on the lua end, you can run: client:set_type_oid(114, nil)
client:set_type_oid(3802, nil) |
thank you very much. |
I defined many functions which return value is jsonb data type in postgresql. How to call pg's udf and handle jsonb return value in pgmoon?
The text was updated successfully, but these errors were encountered: