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

« back to all changes in this revision

Viewing changes to src/test/regress/expected/join.out

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-09-06 14:11:13 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20090906141113-qf5f3hkw7n036jfy
Tags: 8.4.1-1
* Urgency medium due to security fix.
* New upstream security/bug fix release:
  - Disallow "RESET ROLE" and "RESET SESSION AUTHORIZATION" inside
    security-definer functions. This covers a case that was missed in the
    previous patch that disallowed "SET ROLE" and "SET SESSION
    AUTHORIZATION" inside security-definer functions. [CVE-2007-6600]
  - Fix WAL page header initialization at the end of archive recovery.
    This could lead to failure to process the WAL in a subsequent archive
    recovery.
  - Fix "cannot make new WAL entries during recovery" error.
  - Fix problem that could make expired rows visible after a crash.
    This bug involved a page status bit potentially not being set
    correctly after a server crash.
  - Make "LOAD" of an already-loaded loadable module into a no-op.
    Formerly, "LOAD" would attempt to unload and re-load the module,
    but this is unsafe and not all that useful.
  - Make window function PARTITION BY and ORDER BY items always be
    interpreted as simple expressions.
    In 8.4.0 these lists were parsed following the rules used for
    top-level GROUP BY and ORDER BY lists. But this was not correct per
    the SQL standard, and it led to possible circularity.
  - Fix several errors in planning of semi-joins. These led to wrong query
    results in some cases where IN or EXISTS was used together with another
    join.
  - Fix handling of whole-row references to subqueries that are within
    an outer join. An example is SELECT COUNT(ss.-) FROM ... LEFT JOIN
    (SELECT ...) ss ON .... Here, ss.- would be treated as
    ROW(NULL,NULL,...) for null-extended join rows, which is not the same as
    a simple NULL.  Now it is treated as a simple NULL.
  - Fix locale handling with plperl. This bug could cause the server's
    locale setting to change when a plperl function is called, leading to
    data corruption.
  - Fix handling of reloptions to ensure setting one option doesn't
    force default values for others.
  - Ensure that a "fast shutdown" request will forcibly terminate open
    sessions, even if a "smart shutdown" was already in progress.
  - Avoid memory leak for array_agg() in GROUP BY queries.
  - Treat to_char(..., 'TH') as an uppercase ordinal suffix with
    'HH'/'HH12'.  It was previously handled as 'th'.
  - Include the fractional part in the result of EXTRACT(second) and
    EXTRACT(milliseconds) for time and time with time zone inputs.
    This has always worked for floating-point datetime configurations,
    but was broken in the integer datetime code.
  - Fix overflow for INTERVAL 'x ms' when "x" is more than 2 million
    and integer datetimes are in use.
  - Improve performance when processing toasted values in index scans.
    This is particularly useful for PostGIS.
  - Fix a typo that disabled commit_delay.
  - Output early-startup messages to "postmaster.log" if the server is
    started in silent mode. Previously such error messages were discarded,
    leading to difficulty in debugging.
  - Remove translated FAQs. They are now on the wiki. The main FAQ was moved
    to the wiki some time ago.
  - Fix pg_ctl to not go into an infinite loop if "postgresql.conf" is
    empty.
  - Fix several errors in pg_dump's --binary-upgrade mode. pg_dump
    --binary-upgrade is used by pg_migrator.
  - Fix "contrib/xml2"'s xslt_process() to properly handle the maximum
    number of parameters (twenty).
  - Improve robustness of libpq's code to recover from errors during
    "COPY FROM STDIN".
  - Avoid including conflicting readline and editline header files when
    both libraries are installed.
  - Work around gcc bug that causes "floating-point exception" instead
    of "division by zero" on some platforms.
* debian/control: Bump Standards-Version to 3.8.3 (no changes necessary).

Show diffs side-by-side

added added

removed removed

Lines of Context:
2352
2352
 10000
2353
2353
(1 row)
2354
2354
 
 
2355
--
 
2356
-- test for sane behavior with noncanonical merge clauses, per bug #4926
 
2357
--
 
2358
begin;
 
2359
set enable_mergejoin = 1;
 
2360
set enable_hashjoin = 0;
 
2361
set enable_nestloop = 0;
 
2362
create temp table a (i integer);
 
2363
create temp table b (x integer, y integer);
 
2364
select * from a left join b on i = x and i = y and x = i;
 
2365
 i | x | y 
 
2366
---+---+---
 
2367
(0 rows)
 
2368
 
 
2369
rollback;
 
2370
--
 
2371
-- test NULL behavior of whole-row Vars, per bug #5025
 
2372
--
 
2373
select t1.q2, count(t2.*)
 
2374
from int8_tbl t1 left join int8_tbl t2 on (t1.q2 = t2.q1)
 
2375
group by t1.q2 order by 1;
 
2376
        q2         | count 
 
2377
-------------------+-------
 
2378
 -4567890123456789 |     0
 
2379
               123 |     2
 
2380
               456 |     0
 
2381
  4567890123456789 |     6
 
2382
(4 rows)
 
2383
 
 
2384
select t1.q2, count(t2.*)
 
2385
from int8_tbl t1 left join (select * from int8_tbl) t2 on (t1.q2 = t2.q1)
 
2386
group by t1.q2 order by 1;
 
2387
        q2         | count 
 
2388
-------------------+-------
 
2389
 -4567890123456789 |     0
 
2390
               123 |     2
 
2391
               456 |     0
 
2392
  4567890123456789 |     6
 
2393
(4 rows)
 
2394
 
 
2395
select t1.q2, count(t2.*)
 
2396
from int8_tbl t1 left join (select * from int8_tbl offset 0) t2 on (t1.q2 = t2.q1)
 
2397
group by t1.q2 order by 1;
 
2398
        q2         | count 
 
2399
-------------------+-------
 
2400
 -4567890123456789 |     0
 
2401
               123 |     2
 
2402
               456 |     0
 
2403
  4567890123456789 |     6
 
2404
(4 rows)
 
2405
 
 
2406
select t1.q2, count(t2.*)
 
2407
from int8_tbl t1 left join
 
2408
  (select q1, case when q2=1 then 1 else q2 end as q2 from int8_tbl) t2
 
2409
  on (t1.q2 = t2.q1)
 
2410
group by t1.q2 order by 1;
 
2411
        q2         | count 
 
2412
-------------------+-------
 
2413
 -4567890123456789 |     0
 
2414
               123 |     2
 
2415
               456 |     0
 
2416
  4567890123456789 |     6
 
2417
(4 rows)
 
2418