tie_scalar_context.sql 303 B

123456789101112131415161718
  1. /* syntax version 1 */
  2. /* postgres can not */
  3. $foo = ($x) -> {
  4. return AsTuple($x, $x);
  5. };
  6. $ids = (
  7. SELECT AGGREGATE_LIST(id)
  8. FROM (
  9. select "1" as id union all select "2" as id
  10. )
  11. );
  12. $first_ids, $second_ids = $foo(unwrap($ids));
  13. select $first_ids as one, $second_ids as two;