Class ArrayEncoding

java.lang.Object
org.postgresql.jdbc.ArrayEncoding

final class ArrayEncoding extends Object
Utility for using arrays in requests.

Binary format:

  • 4 bytes with number of dimensions
  • 4 bytes, boolean indicating nulls present or not
  • 4 bytes type oid
  • 8 bytes describing the length of each dimension (repeated for each dimension)
    • 4 bytes for length
    • 4 bytes for lower bound on length to check for overflow (it appears this value can always be 0)
  • data in depth first element order corresponding number and length of dimensions
    • 4 bytes describing length of element, 0xFFFFFFFF (-1) means null
    • binary representation of element (iff not null).