altocompta/sql/upgrade.sql
Dany De Bontridder 3ee92ea7d5 Add contact menu
2013-10-05 14:30:34 +00:00

17 lines
No EOL
431 B
PL/PgSQL

create or replace function do_insert() returns void
as
$$
declare
nCount integer;
begin
select count(*) into nCount from menu_ref where me_file='contact.inc.php';
if nCount = 0 then
insert into menu_ref(ME_CODE,me_menu,me_file,me_description,me_type) values ('CONTACT','Contact','contact.inc.php','Liste des contacts','ME');
end if;
end;
$$
language plpgsql;
select do_insert();
drop function do_insert();