X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=db-postgresql%2Fpostgresql-loader.lisp;h=8124bb924029cedc4f59e236fc0e367dd5b0dbfe;hb=0511b7f8e7e344e9886ed0dcd92c73c51e5c8918;hp=ffaf53f2b7bd87bf1c955ffdeb9cc41b87697f31;hpb=158b76b5e78149ab852afccbd479aa26ff76dc33;p=clsql.git diff --git a/db-postgresql/postgresql-loader.lisp b/db-postgresql/postgresql-loader.lisp index ffaf53f..8124bb9 100644 --- a/db-postgresql/postgresql-loader.lisp +++ b/db-postgresql/postgresql-loader.lisp @@ -33,23 +33,10 @@ set to the right path before compiling or loading the system.") (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/" "/sw/lib/") - :drive-letters '("C" "D" "E") - #+(or macosx darwin ccl-5.0) :types - #+(or macosx darwin ccl-5.0) '("so" "dylib") - ))) - (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)))) + (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)