aonestar
.public
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
sp_delete_rategroup_by_id_json
Parameters
Name
Type
Mode
p_rategroup_id
integer
IN
Definition
declare v_result json; v_msg_text text; v_sqlstate text; v_detail text; v_hint text; v_context text; messages jsonb = $${ "80001": "Not found data" }$$; v_row_count int; begin delete from rate_group where id = p_rategroup_id; GET DIAGNOSTICS v_row_count = ROW_COUNT; if v_row_count > 0 then return fn_result_success(); else return fn_result_error('80001', messages->>'80001'); end if; exception when others then get stacked diagnostics v_msg_text = message_text, v_sqlstate = returned_sqlstate, v_detail = pg_exception_detail, v_hint = pg_exception_hint, v_context = pg_exception_context; return fn_handle_error( v_sqlstate, v_msg_text, v_detail, v_hint, v_context, 'sp_delete_rategroup_by_id_json', null ); END;