5 lines
170 B
Text
5 lines
170 B
Text
create or replace function list_triples(n) as (
|
|
list_filter(
|
|
(select array_agg([x,y,z] order by x) from xyz(n)),
|
|
x -> x[1]*x[1] + x[2]*x[2] = x[3]*x[3] )
|
|
);
|