More sensible character_octet_length
[PostgreSQL.git] / contrib / pg_buffercache / pg_buffercache.sql.in
blob3bbe672af7c2158fca63775cf6b746db56d8254a
1 /* $PostgreSQL$ */
3 -- Adjust this setting to control where the objects get created.
4 SET search_path = public;
6 -- Register the function.
7 CREATE OR REPLACE FUNCTION pg_buffercache_pages()
8 RETURNS SETOF RECORD
9 AS 'MODULE_PATHNAME', 'pg_buffercache_pages'
10 LANGUAGE C;
12 -- Create a view for convenient access.
13 CREATE VIEW pg_buffercache AS
14 SELECT P.* FROM pg_buffercache_pages() AS P
15 (bufferid integer, relfilenode oid, reltablespace oid, reldatabase oid,
16 relforknumber int2, relblocknumber int8, isdirty bool, usagecount int2);
18 -- Don't want these to be available at public.
19 REVOKE ALL ON FUNCTION pg_buffercache_pages() FROM PUBLIC;
20 REVOKE ALL ON pg_buffercache FROM PUBLIC;