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

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2011-04-20 15:57:49 UTC
  • mfrom: (1.3.2 upstream) (12.1.2 lucid-security)
  • Revision ID: james.westby@ubuntu.com-20110420155749-t2nm8kb8pzf2nplc
Tags: 8.4.8-0ubuntu0.10.04
* New upstream bug fix release: (LP: #767165)
  - If your installation was upgraded from a previous major release by
    running pg_upgrade, you should take action to prevent possible data loss
    due to a now-fixed bug in pg_upgrade. The recommended solution is to run
    "VACUUM FREEZE" on all TOAST tables.  More information is available at
    http://wiki.postgresql.org/wiki/20110408pg_upgrade_fix.
  - Fix pg_upgrade's handling of TOAST tables.
    This error poses a significant risk of data loss for installations
    that have been upgraded with pg_upgrade. This patch corrects the
    problem for future uses of pg_upgrade, but does not in itself cure
    the issue in installations that have been processed with a buggy
    version of pg_upgrade.
  - Suppress incorrect "PD_ALL_VISIBLE flag was incorrectly set"
    warning.
  - Disallow including a composite type in itself.
  - Avoid potential deadlock during catalog cache initialization.
  - Fix dangling-pointer problem in BEFORE ROW UPDATE trigger handling
    when there was a concurrent update to the target tuple.
  - Disallow "DROP TABLE" when there are pending deferred trigger
    events for the table.
    Formerly the "DROP" would go through, leading to "could not open
    relation with OID nnn" errors when the triggers were eventually
    fired.
  - Prevent crash triggered by constant-false WHERE conditions during
    GEQO optimization.
  - Improve planner's handling of semi-join and anti-join cases.
  - Fix selectivity estimation for text search to account for NULLs.
  - Improve PL/pgSQL's ability to handle row types with dropped columns.
  - Fix PL/Python memory leak involving array slices.
  - Fix pg_restore to cope with long lines (over 1KB) in TOC files.
  - Put in more safeguards against crashing due to division-by-zero
    with overly enthusiastic compiler optimization. (Closes: #616180)

Show diffs side-by-side

added added

removed removed

Lines of Context:
3285
3285
(4 rows)
3286
3286
 
3287
3287
drop function return_dquery();
 
3288
-- test RETURN QUERY with dropped columns
 
3289
create table tabwithcols(a int, b int, c int, d int);
 
3290
insert into tabwithcols values(10,20,30,40),(50,60,70,80);
 
3291
create or replace function returnqueryf()
 
3292
returns setof tabwithcols as $$
 
3293
begin
 
3294
  return query select * from tabwithcols;
 
3295
  return query execute 'select * from tabwithcols';
 
3296
end;
 
3297
$$ language plpgsql;
 
3298
select * from returnqueryf();
 
3299
 a  | b  | c  | d  
 
3300
----+----+----+----
 
3301
 10 | 20 | 30 | 40
 
3302
 50 | 60 | 70 | 80
 
3303
 10 | 20 | 30 | 40
 
3304
 50 | 60 | 70 | 80
 
3305
(4 rows)
 
3306
 
 
3307
alter table tabwithcols drop column b;
 
3308
select * from returnqueryf();
 
3309
 a  | c  | d  
 
3310
----+----+----
 
3311
 10 | 30 | 40
 
3312
 50 | 70 | 80
 
3313
 10 | 30 | 40
 
3314
 50 | 70 | 80
 
3315
(4 rows)
 
3316
 
 
3317
alter table tabwithcols drop column d;
 
3318
select * from returnqueryf();
 
3319
 a  | c  
 
3320
----+----
 
3321
 10 | 30
 
3322
 50 | 70
 
3323
 10 | 30
 
3324
 50 | 70
 
3325
(4 rows)
 
3326
 
 
3327
alter table tabwithcols add column d int;
 
3328
select * from returnqueryf();
 
3329
 a  | c  | d 
 
3330
----+----+---
 
3331
 10 | 30 |  
 
3332
 50 | 70 |  
 
3333
 10 | 30 |  
 
3334
 50 | 70 |  
 
3335
(4 rows)
 
3336
 
 
3337
drop function returnqueryf();
 
3338
drop table tabwithcols;
3288
3339
-- Tests for 8.4's new RAISE features
3289
3340
create or replace function raise_test() returns void as $$
3290
3341
begin