~ubuntu-branches/debian/sid/postgresql-9.3/sid

« back to all changes in this revision

Viewing changes to src/test/regress/sql/select_distinct_on.sql

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2013-05-08 05:39:52 UTC
  • Revision ID: package-import@ubuntu.com-20130508053952-1j7uilp7mjtrvq8q
Tags: upstream-9.3~beta1
ImportĀ upstreamĀ versionĀ 9.3~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--
 
2
-- SELECT_DISTINCT_ON
 
3
--
 
4
 
 
5
SELECT DISTINCT ON (string4) string4, two, ten
 
6
   FROM tmp
 
7
   ORDER BY string4 using <, two using >, ten using <;
 
8
 
 
9
-- this will fail due to conflict of ordering requirements
 
10
SELECT DISTINCT ON (string4, ten) string4, two, ten
 
11
   FROM tmp
 
12
   ORDER BY string4 using <, two using <, ten using <;
 
13
 
 
14
SELECT DISTINCT ON (string4, ten) string4, ten, two
 
15
   FROM tmp
 
16
   ORDER BY string4 using <, ten using >, two using <;
 
17
 
 
18
-- bug #5049: early 8.4.x chokes on volatile DISTINCT ON clauses
 
19
select distinct on (1) floor(random()) as r, f1 from int4_tbl order by 1,2;