no you went too far 🙂 there is a PEAR subdirectory as a part of PEAR. Those scripts are used to package pear and you'll probably never use them.
The directory above the one you found is what you want. To get started try:
<?
include_once '/usr/local/lib/php/DB.php';
$db = DB::connect(array(
'hostspec' => 'localhost',
'database' => 'dbname',
'username' => 'user',
'password' => 'pass',
'phptype' => 'pgsql'
));