X-Git-Url: http://git.kpe.io/?p=clsql.git;a=blobdiff_plain;f=db-postgresql%2Fpostgresql-loader.lisp;h=42f6904ef332b80fc689a3ef1ad4c5f5b38e59fc;hp=39f80a2c341f4d8796c5824f419e1b25b63353c1;hb=d2d49ab13c98bc7a1819a0fd3968268a5567bdc3;hpb=89ff7b55c083fa1095be19d7388d3c490bfc90c5 diff --git a/db-postgresql/postgresql-loader.lisp b/db-postgresql/postgresql-loader.lisp index 39f80a2..42f6904 100644 --- a/db-postgresql/postgresql-loader.lisp +++ b/db-postgresql/postgresql-loader.lisp @@ -7,8 +7,6 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id$ -;;;; ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; ;;;; CLSQL users are granted the rights to distribute and use this software @@ -16,7 +14,7 @@ ;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL. ;;;; ************************************************************************* -(in-package #:postgresql) +(in-package #:pgsql) (defvar *postgresql-supporting-libraries* '("crypt" "c") @@ -28,28 +26,15 @@ set to the right path before compiling or loading the system.") "T if foreign library was able to be loaded successfully") (defmethod clsql-sys:database-type-library-loaded ((database-type - (eql :postgresql))) + (eql :postgresql))) *postgresql-library-loaded*) - + (defmethod clsql-sys:database-type-load-foreign ((database-type - (eql :postgresql))) - (let ((libpath (uffi:find-foreign-library - "libpq" - '("/opt/postgresql/lib/" "/usr/local/lib/" - #+(or 64bit x86-64) "/usr/lib64/" - "/usr/lib/" "/postgresql/lib/" - "/usr/local/pgsql/lib/" "/usr/lib/pgsql/" - "/opt/pgsql/lib/pgsql" "/sw/lib/pgsql/") - :drive-letters '("C" "D" "E") - #+(or macosx darwin ccl-5.0) :types - #+(or macosx darwin ccl-5.0) '("so") - ))) - (if (uffi:load-foreign-library libpath - :module "postgresql" - :supporting-libraries - *postgresql-supporting-libraries*) - (setq *postgresql-library-loaded* t) - (warn "Can't load PostgreSQL client library ~A" libpath)))) + (eql :postgresql))) + (clsql-uffi:find-and-load-foreign-library "libpq" + :module "postgresql" + :supporting-libraries *postgresql-supporting-libraries*) + (setq *postgresql-library-loaded* t)) (clsql-sys:database-type-load-foreign :postgresql)