Oracle 11g has introduced another feature, is RESULT_CACHE. By using this you can actually ask oracle to cache the result of the function call that you made with actual parameter values. Whenever you call the same function next time, Oracle will not execute the function again but, will return the result from Cache. This caching is at Server level. So different sessions can share their results.
More On This..
To Drop all objects from Postgres Schema there could be following two approaches: Drop Schema with cascade all and re-create it again. In some cases where you dont want to/not allowed to drop and recreate schema, its easy to look for objects on current schema and drop them. following script would help to do so, Create function which would do the task and then drop that function too. --- CREATE OR REPLACE FUNCTION drop_DB_objects() RETURNS VOID AS $$ DECLARE rd_object RECORD; v_idx_statement VARCHAR(500); BEGIN ---1. Dropping all stored functions RAISE NOTICE '%', 'Dropping all stored functions...'; FOR rd_object IN ( SELECT format('%I.%I(%s)', ns.nspname, p.proname, oidvectortypes(p.proargtypes)) as functionDef FROM pg_proc p INNER JOIN pg_namespace ns ON (p.pronamespace = ns.oid) WHERE ns.nspname = current_schema AND p.proname <...
Comments
Post a Comment