This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create type point_t as (x float, y float); | |
create type triangle_t as (p1 point_t, p2 point_t, p3 point_t, surface float); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create type point_t as (x float, y float); | |
create type triangle_t as (p1 point_t, p2 point_t, p3 point_t, surface float); | |
create function largest_triangle_accum (maxsurfacetriangle triangle_t, p1 point_t, p2 point_t, p3 point_t) | |
returns triangle_t | |
language SQL | |
as $$ | |
select | |
case | |
when maxsurfacetriangle is null or triangle_surface(p1,p2,p3) > maxsurfacetriangle.surface |
NewerOlder