X-Git-Url: http://git.kpe.io/?p=clsql.git;a=blobdiff_plain;f=db-postgresql%2Fpostgresql-loader.lisp;h=f98aec691bfedd26fe4a90c0654af57dc7f169d0;hp=a7fefa9eceba5fd747673279ee659efdf9a13509;hb=ab37892bfa71e0d66021cc73f28cd189be30c81c;hpb=81456a9d051332aa728013a819fe1c38b6be7529 diff --git a/db-postgresql/postgresql-loader.lisp b/db-postgresql/postgresql-loader.lisp index a7fefa9..f98aec6 100644 --- a/db-postgresql/postgresql-loader.lisp +++ b/db-postgresql/postgresql-loader.lisp @@ -16,7 +16,7 @@ ;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL. ;;;; ************************************************************************* -(in-package #:postgresql) +(in-package #:pgsql) (defvar *postgresql-supporting-libraries* '("crypt" "c") @@ -33,24 +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/" - "/windows/system32/") - :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)