select_distinct_on.out 203 B

1234567
  1. -- bug #5049: early 8.4.x chokes on volatile DISTINCT ON clauses
  2. select distinct on (1) floor(random()) as r, f1 from int4_tbl order by 1,2;
  3. r | f1
  4. ---+-------------
  5. 0 | -2147483647
  6. (1 row)