While some contrib programs such as pgbench, are directly executable, most are utilities that you install into a database in order to add extra features to them.
As an example, to install the module into a database named abc, the following command line would work (assuming the RedHat location of the file):
$ psql -d abc -f /usr/share/postgresql/contrib/pg_buffercache.sql
You could instead use the pgAdmin III GUI management utility, which is bundled with the Windows installer for PostgreSQL, instead of the command line:
- Navigate to the database you want to install the module into.
- Click on the SQL icon in the toolbar to bring up the command editor.
- Choose File/Open. Navigate to C:\Program
Files\PostgreSQL/version/share/contrib/pg_buffercache.sql and open that file. - Execute using either the green arrow or Query/Execute.
You can do a quick test of the module installed on any type of system by running the following quick query:
SELECT * FROM pg_buffercache;
If any results come back, the module was installed. Note that pg_buffercache will only be installable and usable by database superusers.