X-Git-Url: http://git.kpe.io/?p=clsql.git;a=blobdiff_plain;f=db-postgresql%2Fpostgresql-loader.lisp;h=160ca2c69fede877a264b5b750dd635c87e6ae38;hp=e33f1354db5d2aaf055f74bf99bbbce97ac07721;hb=e567409d9fff3f7231c2a0bb69b345e19de2b246;hpb=8a8ee2d7d791b7a3efaed06420802a925d16fca3 diff --git a/db-postgresql/postgresql-loader.lisp b/db-postgresql/postgresql-loader.lisp index e33f135..160ca2c 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") @@ -28,28 +28,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/" - #+64bit "/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)