1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
| CREATE TYPE Person AS (
| name text,
| age integer,
| weight double precision,
| height real,
| salary double precision,
| married boolean
| );
|
| CREATE OR REPLACE FUNCTION helloPersonAgeJava(Person)
| RETURNS INTEGER
| AS 'com.example.proj.TestComposites.helloPersonAgeJava'
| IMMUTABLE LANGUAGE java;
|
| SELECT helloPersonAgeJava(('John Smith', 38, 85.5, 1.71, 999.999, true)) = integer '38';
|
| CREATE OR REPLACE FUNCTION helloPersonJava(Person)
| RETURNS Person
| AS 'com.example.proj.TestComposites.helloPersonJava'
| IMMUTABLE LANGUAGE java;
|
| SELECT helloPersonJava(('John Smith', 38, 85.5, 1.71, 999.999, true));
|
|