File: plproxy_table.sql

package info (click to toggle)
postgresql-plproxy 2.11.0-13
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 564 kB
  • sloc: ansic: 3,476; sql: 1,136; lex: 340; yacc: 171; makefile: 93; sh: 18; awk: 14
file content (30 lines) | stat: -rw-r--r-- 681 bytes parent folder | download | duplicates (7)
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

\c test_part0


create or replace function test_ret_table(id int)
returns table(id int, t text) as $$
    select * from (values(1, 'test'),(2, 'toto') ) as toto;
$$ language sql;

select * from test_ret_table(0);

\c regression

create or replace function test_ret_table_normal(in _id integer, out id integer, out t text)
returns setof record as $$
    cluster 'testcluster';
    run on _id;
    target test_ret_table;
$$ language plproxy;

select * from test_ret_table_normal(0);

create or replace function test_ret_table(in _id integer)
returns table (id integer, t text) as $$
    cluster 'testcluster';
    run on _id;
$$ language plproxy;

select * from test_ret_table(0);