Closed bog-dan-ro closed 3 years ago
+1
Support for array on the API level (libpq) is just terrible. It's hard to understand why they have almost no support for sending and receiving arrays properly, i.e. without escaping and unescaping your data over and over again, manually. Not to mention the total lack of documentation on how to send or receive it in binary mode. sigh
Anyways, I started working on this, but consider it work-in-progress for now. Anything might change still and I reserve the right to simply remove all of the array support if things get out of hand.
BTW: The example seems slightly flawed, as I get:
exception: PGRES_FATAL_ERROR/22P02: ERROR: malformed array literal: "{{1,2,3},{4,5}}"
DETAIL: Multidimensional arrays must have sub-arrays with matching dimensions.
We now have support for ARRAY
s, so I'll close this issue. Please test and let me know if there are any problems or if you have any other feedback.
Will be great if we could write something like: