blob: 595ce19b092bbe4690c4c96edf1c32a64ddd20f4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
\c test_part0
create function test_table1(out id int4, out data text, out data2 text, out data3 text)
as $$
begin
id = 1;
data = 'Data1';
data2 = 'Data2';
data3 = 'Data3';
return;
end;
$$ language plpgsql;
select * from test_table1();
\c regression
create table ret_table (
id int4,
data text
);
create function test_table1()
returns ret_table as $$
cluster 'testcluster';
run on 0;
$$ language plproxy;
select * from test_table1();
-- add column
alter table ret_table add column data2 text;
select * from test_table1();
\c regression
select * from test_table1();
-- drop & add
alter table ret_table drop column data2;
alter table ret_table add column data3 text;
select * from test_table1();
\c regression
select * from test_table1();
-- drop
alter table ret_table drop column data3;
select * from test_table1();
\c regression
select * from test_table1();
-- add again
alter table ret_table add column data3 text;
alter table ret_table add column data2 text;
select * from test_table1();
\c regression
select * from test_table1();
|