Re: Core Extensions relocation

Greg Smith <greg@2ndquadrant.com>

From: Greg Smith <greg@2ndquadrant.com>
To: Vinicius Abrahao <vinnix.bsd@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>, matheus.espanhol@dextra-sw.com
Date: 2011-06-09T15:51:01Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Updates to contrib/isn ISBN tables.

  2. Add a "LIKE = typename" clause to CREATE TYPE for base types. This allows

Vinicius Abrahao wrote:
> This is my first post at Hackers, so sorry if I am been a noob here, 
> but I am pretty confused about
> how to create the extension pg_buffercache.

This list is for talking about development of new features, normally on 
the latest development version of the software (right now 9.1).  There 
is no such thing as CREATE EXTENSION in versions before that.  A 
question like "how do I install pg_buffercache for 9.0?" should normally 
get sent to one of the other mailing lists; any of pgsql-performance, 
pgsql-admin, or pgsql-general would be appropriate to ask that at.  This 
one really isn't.  It's also better to avoid taking someone else's 
discussion and replying to it with your questions.

> But even so, I need to ask, because my production is on another versions:
> What is the right way to install this contrib at 9.0.1, 9.0.2 and 9.0.4 ?

But since I happen to know this answer, here's an example from a RedHat 
derived Linux system running PostgreSQL 9.0.4, logged in as the postgres 
user:

-bash-3.2$ locate pg_buffercache.sql
/usr/pgsql-9.0/share/contrib/pg_buffercache.sql
/usr/pgsql-9.0/share/contrib/uninstall_pg_buffercache.sql
-bash-3.2$ psql -d pgbench -f 
/usr/pgsql-9.0/share/contrib/pg_buffercache.sql
SET
CREATE FUNCTION
CREATE VIEW
REVOKE
REVOKE
-bash-3.2$ psql -d pgbench -c "select count(*) from pg_buffercache"
 count
-------
  4096

The location of the file will be different on other platforms, but 
that's the basic idea of how you install it.

-- 
Greg Smith   2ndQuadrant US    greg@2ndQuadrant.com   Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support  www.2ndQuadrant.us