diff options
| author | Bruce Momjian <bruce@momjian.us> | 2006-05-30 13:40:56 +0000 |
|---|---|---|
| committer | Bruce Momjian <bruce@momjian.us> | 2006-05-30 13:40:56 +0000 |
| commit | 4d06e86d041b48a2ecd4f45e2ecbbcf69f3454c0 (patch) | |
| tree | 0204196bb859d1cc81ce489a2d26e9046a92d371 /src/test/regress/expected | |
| parent | fc079f841146dda76e732b4d6f79c4478b890000 (diff) | |
| download | postgresql-4d06e86d041b48a2ecd4f45e2ecbbcf69f3454c0.tar.gz | |
Revert patch, needs more work:
---------------------------------------------------------------------------
Add dynamic record inspection to PL/PgSQL, useful for generic triggers:
tval2 := r.(cname);
or
columns := r.(*);
Titus von Boxberg
Diffstat (limited to 'src/test/regress/expected')
| -rw-r--r-- | src/test/regress/expected/plpgsql.out | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/src/test/regress/expected/plpgsql.out b/src/test/regress/expected/plpgsql.out index e20d76c0ae..6e6597dadb 100644 --- a/src/test/regress/expected/plpgsql.out +++ b/src/test/regress/expected/plpgsql.out @@ -2725,44 +2725,6 @@ end; $$ language plpgsql; ERROR: end label "outer_label" specified for unlabelled block CONTEXT: compile of PL/pgSQL function "end_label4" near line 5 --- check introspective records -create table ritest (i INT4, t TEXT); -insert into ritest (i, t) VALUES (1, 'sometext'); -create function test_record() returns void as $$ -declare - cname text; - tval text; - ival int4; - tval2 text; - ival2 int4; - columns text[]; - r RECORD; -begin - SELECT INTO r * FROM ritest WHERE i = 1; - ival := r.i; - tval := r.t; - RAISE NOTICE 'ival=%, tval=%', ival, tval; - cname := 'i'; - ival2 := r.(cname); - cname :='t'; - tval2 := r.(cname); - RAISE NOTICE 'ival2=%, tval2=%', ival2, tval2; - columns := r.(*); - RAISE NOTICE 'fieldnames=%', columns; - RETURN; -end; -$$ language plpgsql; -select test_record(); -NOTICE: ival=1, tval=sometext -NOTICE: ival2=1, tval2=sometext -NOTICE: fieldnames={i,t} - test_record -------------- - - (1 row) - -drop table ritest; -drop function test_record(); -- using list of scalars in fori and fore stmts create function for_vect() returns void as $proc$ <<lbl>>declare a integer; b varchar; c varchar; r record; |
