~aglenyoung/+junk/postgres-9.3-dtrace

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Martin Pitt, Christoph Berg, Martin Pitt
  • Date: 2013-06-26 15:13:32 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20130626151332-p34yjpn0txbdsdzd
Tags: 9.3~beta2-1
[ Christoph Berg ]
* hurd-i386: Ignore testsuite failures so we have a working libpq5 (they
  don't implement semaphores so the server won't even start).
* Mark postgresql-9.3 as beta in the description, suggested by Joshua D.
  Drake.

[ Martin Pitt ]
* New upstream release 9.3 beta2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
95
95
select ROW('ABC','DEF') ~>=~ ROW('DEF','ABC') as false;
96
96
select ROW('ABC','DEF') ~~ ROW('DEF','ABC') as fail;
97
97
 
 
98
-- Comparisons of ROW() expressions can cope with some type mismatches
 
99
select ROW(1,2) = ROW(1,2::int8);
 
100
select ROW(1,2) in (ROW(3,4), ROW(1,2));
 
101
select ROW(1,2) in (ROW(3,4), ROW(1,2::int8));
 
102
 
98
103
-- Check row comparison with a subselect
99
104
select unique1, unique2 from tenk1
100
105
where (unique1, unique2) < any (select ten, ten from tenk1 where hundred < 3)
102
107
order by 1;
103
108
 
104
109
-- Also check row comparison with an indexable condition
105
 
select thousand, tenthous from tenk1
106
 
where (thousand, tenthous) >= (997, 5000)
107
 
order by thousand, tenthous;
 
110
explain (costs off)
 
111
select thousand, tenthous from tenk1
 
112
where (thousand, tenthous) >= (997, 5000)
 
113
order by thousand, tenthous;
 
114
 
 
115
select thousand, tenthous from tenk1
 
116
where (thousand, tenthous) >= (997, 5000)
 
117
order by thousand, tenthous;
 
118
 
 
119
-- Check row comparisons with IN
 
120
select * from int8_tbl i8 where i8 in (row(123,456));  -- fail, type mismatch
 
121
 
 
122
explain (costs off)
 
123
select * from int8_tbl i8
 
124
where i8 in (row(123,456)::int8_tbl, '(4567890123456789,123)');
 
125
 
 
126
select * from int8_tbl i8
 
127
where i8 in (row(123,456)::int8_tbl, '(4567890123456789,123)');
108
128
 
109
129
-- Check some corner cases involving empty rowtypes
110
130
select ROW();