~ubuntu-branches/ubuntu/lucid/postgresql-8.4/lucid-proposed

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2012-12-10 15:53:42 UTC
  • mfrom: (1.3.9)
  • Revision ID: package-import@ubuntu.com-20121210155342-3scm68xcxel275jb
Tags: 8.4.15-0ubuntu10.04
* New upstream bug fix release: (LP: #1088393)
  - Fix multiple bugs associated with "CREATE INDEX CONCURRENTLY"
    Fix "CREATE INDEX CONCURRENTLY" to use in-place updates when
    changing the state of an index's pg_index row. This prevents race
    conditions that could cause concurrent sessions to miss updating
    the target index, thus resulting in corrupt concurrently-created
    indexes.
    Also, fix various other operations to ensure that they ignore
    invalid indexes resulting from a failed "CREATE INDEX CONCURRENTLY"
    command. The most important of these is "VACUUM", because an
    auto-vacuum could easily be launched on the table before corrective
    action can be taken to fix or remove the invalid index.
  - See HISTORY/changelog.gz for details about other bug fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
330
330
-- regression test: check for bug with propagation of implied equality
331
331
-- to outside an IN
332
332
--
 
333
analyze tenk1;          -- ensure we get consistent plans here
 
334
 
333
335
select count(*) from tenk1 a where unique1 in
334
336
  (select unique1 from tenk1 b join tenk1 c using (unique1)
335
337
   where b.unique2 = 42);
637
639
--
638
640
select * from int4_tbl a full join int4_tbl b on true;
639
641
select * from int4_tbl a full join int4_tbl b on false;
 
642
 
 
643
--
 
644
-- test handling of potential equivalence clauses above outer joins
 
645
--
 
646
 
 
647
select q1, unique2, thousand, hundred
 
648
  from int8_tbl a left join tenk1 b on q1 = unique2
 
649
  where coalesce(thousand,123) = q1 and q1 = coalesce(hundred,123);
 
650
 
 
651
select f1, unique2, case when unique2 is null then f1 else 0 end
 
652
  from int4_tbl a left join tenk1 b on f1 = unique2
 
653
  where (case when unique2 is null then f1 else 0 end) = 0;