git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 136bea1)
Improve /contrib/pg_buffercache installation to use BEGIN/COMMIT,
2006年4月26日 22:50:17 +0000 (22:50 +0000)
2006年4月26日 22:50:17 +0000 (22:50 +0000)
improve examples.

Mark Kirkwood


diff --git a/contrib/pg_buffercache/README.pg_buffercache b/contrib/pg_buffercache/README.pg_buffercache
index b5c9321553293ae79b8be1835d1025e81fbae69c..5fbfbe13c07f8b59c2556735a3094cf2f59994a0 100644 (file)
--- a/contrib/pg_buffercache/README.pg_buffercache
+++ b/contrib/pg_buffercache/README.pg_buffercache
@@ -76,8 +76,9 @@ Sample output
isdirty boolean);
regression=# SELECT c.relname, count(*) AS buffers
- FROM pg_class c, pg_buffercache b
- WHERE b.relfilenode = c.relfilenode
+ FROM pg_class c INNER JOIN pg_buffercache b
+ ON b.relfilenode = c.relfilenode INNER JOIN pg_database d
+ ON (b.reldatabase = d.oid AND d.datname = current_database())
GROUP BY c.relname
ORDER BY 2 DESC LIMIT 10;
relname | buffers
diff --git a/contrib/pg_buffercache/pg_buffercache.sql.in b/contrib/pg_buffercache/pg_buffercache.sql.in
index 85c7b2869a27e833222c0849fae9e191af9a02dc..ea63234f6b8a629c8065025af1d1857f2d9a1536 100644 (file)
--- a/contrib/pg_buffercache/pg_buffercache.sql.in
+++ b/contrib/pg_buffercache/pg_buffercache.sql.in
@@ -1,4 +1,5 @@
-- Adjust this setting to control where the objects get created.
+BEGIN;
SET search_path = public;
-- Register the function.
@@ -16,3 +17,5 @@ CREATE VIEW pg_buffercache AS
-- Don't want these to be available at public.
REVOKE ALL ON FUNCTION pg_buffercache_pages() FROM PUBLIC;
REVOKE ALL ON pg_buffercache FROM PUBLIC;
+
+COMMIT;
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /