
create function inline_0 ()
returns integer as '
declare  
  ds_id portal_datasources.datasource_id%TYPE;
begin

    perform acs_sc_binding__delete(
        ''portal_datasource'',
        ''tlf_assignment_portlet''
    );

    perform acs_sc_impl_alias__delete(
        ''portal_datasource'',
        ''tlf_assignment_portlet'',
        ''GetMyName''
    );

    perform acs_sc_impl_alias__delete(
        ''portal_datasource'',
        ''tlf_assignment_portlet'',
        ''GetPrettyName''
    );

    perform acs_sc_impl_alias__delete(
        ''portal_datasource'',
        ''tlf_assignment_portlet'',
        ''Link''
    );

    perform acs_sc_impl_alias__delete(
        ''portal_datasource'',
        ''tlf_assignment_portlet'',
        ''AddSelfToPage''
    );

    perform acs_sc_impl_alias__delete(
        ''portal_datasource'',
        ''tlf_assignment_portlet'',
        ''RemoveSelfFromPage''
    );

    perform acs_sc_impl_alias__delete(
        ''portal_datasource'',
        ''tlf_assignment_portlet'',
        ''Show''
    );

    perform acs_sc_impl_alias__delete(
        ''portal_datasource'',
        ''tlf_assignment_portlet'',
        ''Edit''
    );

    perform acs_sc_impl__delete(
        ''portal_datasource'',
        ''tlf_assignment_portlet''
    );

    begin
    
        select datasource_id into ds_id
            from portal_datasources
        where name = ''tlf_assignment_portlet'';

    end;

  if ds_id is not null then
    perform portal_datasource__delete(ds_id);
  end if;
  
  return 0;

end;
' language 'plpgsql';

select inline_0();
drop function inline_0();
