code in oracle
parameter info = in iv_column_1, in iv_column_2, inout iv_msg
begin
update main_table set column_1 = iv_column_1 where column_2 =
iv_colmun_2;
if sqlcode <> 0 then
iv_msg := 'main_table error '||CHR (13)||CHR (10)||SQLERRM;
return;
end if;
insert into history_table (column_1 , column_2) values (iv_column_1,
iv_column_2);
if sqlcode <> 0 then
iv_msg := 'history_table error '||CHR (13)||CHR (10)||SQLERRM;
return;
end if;
code in postgresql
parameter info = in iv_column_1, in iv_column_2, inout iv_msg
begin
update main_table set column_1 = iv_column_1 where column_2 =
iv_colmun_2;
if sqlstate <> 0 then
iv_msg := 'main_table error '||CHR (13)||CHR (10)||SQLERRM;
return;
end if;
insert into history_table (column_1 , column_2) values (iv_column_1,
iv_column_2);
if sqlstate <> 0 then
iv_msg := 'history_table error '||CHR (13)||CHR (10)||SQLERRM;
return;
end if;
error text :
SQL Error [42703]: ERROR: column "sqlstate" does not exist