Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
16
Task/Exceptions/PL-pgSQL/exceptions-2.sql
Normal file
16
Task/Exceptions/PL-pgSQL/exceptions-2.sql
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
create function special_division(p_num double precision, p_den double precision) returns text
|
||||
as $body$
|
||||
begin
|
||||
return p_num/p_den::text;
|
||||
EXCEPTION
|
||||
when division_by_zero then
|
||||
if p_num>0 then
|
||||
return 'Inf';
|
||||
ELSIF p_num<0 then
|
||||
return '-Inf';
|
||||
else
|
||||
return 'INDEF';
|
||||
end if;
|
||||
when others then
|
||||
raise;
|
||||
end;
|
||||
Loading…
Add table
Add a link
Reference in a new issue