static_zip.sql 597 B

1234567891011121314151617181920
  1. /* postgres can not */
  2. /* syntax version 1 */
  3. $s1 = AsStruct(1 as k1, "2" as k2, ["3", "4"] as k3);
  4. $s2 = AsStruct("10" as k1, [20, 30] as k2, 40 as k3);
  5. $s3 = AsStruct([100, 200] as k1, 300 as k2, "400" as k3);
  6. $t1 = AsTuple(1, "2", ["3", "4"]);
  7. $t2 = AsTuple("10", [20, 30], 40);
  8. $t3 = AsTuple([100, 200], 300, "400");
  9. SELECT
  10. StaticZip($s1, $s2, $s3) as structs,
  11. StaticZip($t1, $t2, $t3) as tuples,
  12. StaticZip(AsStruct(), AsStruct()) as empty_structs,
  13. StaticZip(AsTuple(), AsTuple()) as empty_tuples,
  14. StaticZip($s1) as single_struct,
  15. StaticZip($t1) as single_tuple,
  16. ;