-
Notifications
You must be signed in to change notification settings - Fork 31
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
Errored when inserting array value of custom datatype in binary mode . #271
Comments
Hi, I was not able to reproduce this issue. Using the example from https://github.com/aws/pg_tle/blob/main/docs/09_datatypes.md#create-base-type, an array value can be successfully inserted and retrieved:
Not sure if this is related, an array value input should be enclosed within curly braces and separated by commas; https://www.postgresql.org/docs/current/arrays.html#ARRAYS-INPUT Also, the input value has to be a textual (string) representation; a binary input representation is not supported in pg_tle yet. Could you try using a textual (string) representation instead of binary representation as the input and see if that works? |
String representation works. But it doesn't work for binary representation of an array. The following script will convert the text array to binary representation ( the following code converts array values to binary formats but not always). import java.sql.Connection; public class Main {
} Wireshark capture confirms that data is serialized using binary formats. |
Binary input representation (either an array or individual value) is not supported for a custom data type created by pg_tle API; Only string representative as the input format is supported. If a binary input representative is important for your application, could you create a feature request and share your use cases so that we may add this feature in a future version? |
Description
We created the custom type. And created the custom_type[] column. While inserting the array values in those columns in binary mode, the server errored with 'no binary input function available for type custom_type'.
If the array values are in the text mode, it works as expected.
Steps to reproduce
Expected outcome
The values to be inserted.
Actual outcome
Error from the server with ErrMessage: 'no binary input function available for type custom_type'.
Analysis
None.
If applicable, please provide logs that demonstrate the issue.
Please remove any sensitive information from the logs.
The text was updated successfully, but these errors were encountered: