Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
pg_buffercache--1.2.sql22 linesDownload Raw Back to extension
1/* contrib/pg_buffercache/pg_buffercache--1.2.sql */2 3-- complain if script is sourced in psql, rather than via CREATE EXTENSION4\echo Use "CREATE EXTENSION pg_buffercache" to load this file. \quit5 6-- Register the function.7CREATE FUNCTION pg_buffercache_pages()8RETURNS SETOF RECORD9AS 'MODULE_PATHNAME', 'pg_buffercache_pages'10LANGUAGE C PARALLEL SAFE;11 12-- Create a view for convenient access.13CREATE VIEW pg_buffercache AS14	SELECT P.* FROM pg_buffercache_pages() AS P15	(bufferid integer, relfilenode oid, reltablespace oid, reldatabase oid,16	 relforknumber int2, relblocknumber int8, isdirty bool, usagecount int2,17	 pinning_backends int4);18 19-- Don't want these to be available to public.20REVOKE ALL ON FUNCTION pg_buffercache_pages() FROM PUBLIC;21REVOKE ALL ON pg_buffercache FROM PUBLIC;22 
codekingpro/portable-devtools · Team Ai