All Downloads are FREE. Search and download functionalities are using the official Maven repository.

postgresql.function.ibmutl001_getdbrefreshdate.sql Maven / Gradle / Ivy

There is a newer version: 6.6.11
Show newest version
-- Function: public.ibmutl001_getdbrefreshdate()

-- DROP FUNCTION public.ibmutl001_getdbrefreshdate();

CREATE OR REPLACE FUNCTION ibmutl001_getdbrefreshdate()
  RETURNS timestamp without time zone AS
$BODY$
DECLARE

  DateRefresh  timestamp;

BEGIN
  SELECT (pg_stat_file('base/'||oid ||'/PG_VERSION')).modification  into DateRefresh FROM pg_database
  where datname = current_database();
   Return DateRefresh;
Exception
  When Others Then
    Return clock_timestamp();
END;

$BODY$
  LANGUAGE plpgsql VOLATILE SECURITY DEFINER
  COST 100;




© 2015 - 2024 Weber Informatics LLC | Privacy Policy