Maybe from PHP?
http://ar.php.net/pgsql
Acording to that documentation, you'll need to recompile php with support for postgresql. First install PostgreSQL and then recompile PHP with the option stated there.
To recompile PHP (if you're not used to compile stuff) grab all the files here (including the pear subdirectory):
http://mirror.switch.ch/ftp/mirror/s.../source/n/php/
After you have them put it in a directory with a subdirectory pear with the files that should be there. Then edit php.SlackBuild file adding the option (there are options in that file, you'll know where to put it) and finally run it: sh php.SlackBuild
If all goes fine, it will recompile PHP and leave the new package under /tmp.