Last active
August 29, 2015 13:56
-
-
Save klang/8880393 to your computer and use it in GitHub Desktop.
code text added to database with f.sql and extracted with dump_source.sql, resulting in F.sql (notice uppercase) .. Seen from a versioning system (git) perspective, most of the lines in the original source have changed. The lines containing "begin" and "end;" are the only ones that are unchanged. Git's model state that, if the SHA-1 of the conte…
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- create directory REPOSITORY as '/REPOSITORY'; | |
-- GRANT READ,WRITE ON DIRECTORY REPOSITORY TO oraclegit; | |
DECLARE | |
v_ddl_clob CLOB; | |
BEGIN | |
FOR c IN ( SELECT object_name, object_type | |
FROM user_objects | |
WHERE object_type IN ('PROCEDURE','FUNCTION') ) | |
LOOP | |
v_ddl_clob := dbms_metadata.get_ddl(c.object_type, c.object_name); | |
dbms_xslprocessor.clob2file(v_ddl_clob, 'REPOSITORY', c.object_name||'.sql'); | |
END LOOP; | |
END; | |
/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE FUNCTION "ORACLEGIT"."F" return varchar as | |
begin | |
return | |
'Hello world'; | |
end; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create or replace function f return varchar as | |
begin | |
return 'Hello world'; | |
end; | |
/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment