summaryrefslogtreecommitdiff
path: root/test/expected/plproxy_range.out
blob: cc46c845f6e4a04402ade8f61c2ba2262b72bd45 (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
\c test_part0
CREATE TYPE f8range AS RANGE (
        subtype = float8,
        subtype_diff = float8mi
);
create or replace function test_range(in id int, inout frange f8range,
    out irange int4range)
returns record as $$
begin
    irange := '[20,30)';
    return;
end;
$$ language plpgsql;
select * from test_range(0, '(1.5,2.4]');
  frange   | irange  
-----------+---------
 (1.5,2.4] | [20,30)
(1 row)

\c regression
CREATE TYPE f8range AS RANGE (
        subtype = float8,
        subtype_diff = float8mi
);
create or replace function test_range(in _id integer, inout frange f8range, out irange int4range)
returns setof record as $$
    cluster 'testcluster';
    run on _id;
$$ language plproxy;
select * from test_range(0, '(1.5,2.4]');
  frange   | irange  
-----------+---------
 (1.5,2.4] | [20,30)
(1 row)