code: function formatArray(array) {
      const loop = a => '[' + a.map(v => v instanceof Array ? loop(v) : formatValue(v)).join() + ']';
      return array.length ? ('array' + loop(array)) : '\'{}\'';
  }
docs: ////////////////////////////////////////////////////////////////////////////////////////////////////////////// Converts array of values into PostgreSQL Array Constructor: array[...], as per PostgreSQL documentation: http://www.postgresql.org/docs/9.6/static/arrays.html  Arrays of any depth/dimension are supported.  Top-level empty arrays are formatted as literal '{}' to avoid the necessity of explicit type casting, as the server cannot automatically infer type of an empty non-literal array.