Index: openacs-4/packages/dotlrn-portlet/sql/postgresql/dotlrn-portlet-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-portlet/sql/postgresql/dotlrn-portlet-drop.sql,v diff -u -N -r1.3 -r1.3.22.1 --- openacs-4/packages/dotlrn-portlet/sql/postgresql/dotlrn-portlet-drop.sql 9 Aug 2002 18:39:29 -0000 1.3 +++ openacs-4/packages/dotlrn-portlet/sql/postgresql/dotlrn-portlet-drop.sql 18 Aug 2014 22:08:03 -0000 1.3.22.1 @@ -29,16 +29,22 @@ -- License version 2 or higher. Full text of the license is available -- from the GNU Project: http://www.fsf.org/copyleft/gpl.html -create function inline_0() -returns integer as ' -declare + + +-- +-- procedure inline_0/0 +-- +CREATE OR REPLACE FUNCTION inline_0( + +) RETURNS integer AS $$ +DECLARE ds_id portal_datasources.datasource_id%TYPE; -begin +BEGIN -- begin select datasource_id into ds_id from portal_datasources - where name = ''dotlrn-portlet''; + where name = 'dotlrn-portlet'; -- exception when no_data_found then -- ds_id := null; -- end; @@ -49,79 +55,87 @@ return 0; -end;' language 'plpgsql'; +END; +$$ LANGUAGE plpgsql; select inline_0(); drop function inline_0(); -create function inline_1() -returns integer as ' -declare + + +-- +-- procedure inline_1/0 +-- +CREATE OR REPLACE FUNCTION inline_1( + +) RETURNS integer AS $$ +DECLARE foo integer; -begin +BEGIN -- add all the hooks foo := acs_sc_impl_alias__delete ( - ''portal_datasource'', - ''dotlrn_portlet'', - ''GetMyName'' + 'portal_datasource', + 'dotlrn_portlet', + 'GetMyName' ); foo := acs_sc_impl_alias__delete ( - ''portal_datasource'', - ''dotlrn_portlet'', - ''GetPrettyName'' + 'portal_datasource', + 'dotlrn_portlet', + 'GetPrettyName' ); foo := acs_sc_impl_alias__delete ( - ''portal_datasource'', - ''dotlrn_portlet'', - ''Link'' + 'portal_datasource', + 'dotlrn_portlet', + 'Link' ); foo := acs_sc_impl_alias__delete ( - ''portal_datasource'', - ''dotlrn_portlet'', - ''AddSelfToPage'' + 'portal_datasource', + 'dotlrn_portlet', + 'AddSelfToPage' ); foo := acs_sc_impl_alias__delete ( - ''portal_datasource'', - ''dotlrn_portlet'', - ''Show'' + 'portal_datasource', + 'dotlrn_portlet', + 'Show' ); foo := acs_sc_impl_alias__delete ( - ''portal_datasource'', - ''dotlrn_portlet'', - ''Edit'' + 'portal_datasource', + 'dotlrn_portlet', + 'Edit' ); foo := acs_sc_impl_alias__delete ( - ''portal_datasource'', - ''dotlrn_portlet'', - ''RemoveSelfFromPage'' + 'portal_datasource', + 'dotlrn_portlet', + 'RemoveSelfFromPage' ); -- Drop the binding perform acs_sc_binding__delete ( - ''portal_datasource'', - ''dotlrn_portlet'' + 'portal_datasource', + 'dotlrn_portlet' ); -- drop the impl foo := acs_sc_impl__delete ( - ''portal_datasource'', - ''dotlrn_portlet'' + 'portal_datasource', + 'dotlrn_portlet' ); return 0; return 0; -end;' language 'plpgsql'; +END; +$$ LANGUAGE plpgsql; select inline_1(); drop function inline_1();