X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=interfaces%2Fpostgresql%2Fpostgresql-loader.cl;h=ff95f08bbc2b622986ebe63235b7d1586343eaca;hb=04a4f10a13773101f275c31f300b28c08be652c0;hp=30cff4f813112d4a548a57a12d9f43ea1091a7e7;hpb=4f48d771ad17d7e753382fe8f551e7a9ca9e7b53;p=clsql.git diff --git a/interfaces/postgresql/postgresql-loader.cl b/interfaces/postgresql/postgresql-loader.cl index 30cff4f..ff95f08 100644 --- a/interfaces/postgresql/postgresql-loader.cl +++ b/interfaces/postgresql/postgresql-loader.cl @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id: postgresql-loader.cl,v 1.7 2002/05/13 22:05:21 kevin Exp $ +;;;; $Id: postgresql-loader.cl,v 1.11 2002/05/18 17:37:49 kevin Exp $ ;;;; ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -34,21 +34,19 @@ set to the right path before compiling or loading the system.") (defmethod clsql-sys:database-type-load-foreign ((database-type (eql :postgresql))) - (when - (uffi:load-foreign-library - (uffi:find-foreign-library "libpq" - '("/opt/postgresql/lib/" "/usr/local/lib/" - "/usr/lib/" "/postgresql/lib/" - "/usr/local/pgsql/lib/" "/usr/lib/pgsql/" - "/opt/pgsql/lib/pgsql") - :drive-letters '("C" "D" "E")) - - :module "postgresql" - :supporting-libraries - *postgresql-supporting-libraries*) - (setq *postgresql-library-loaded* t))) + (let ((libpath (uffi:find-foreign-library + "libpq" + '("/opt/postgresql/lib/" "/usr/local/lib/" + "/usr/lib/" "/postgresql/lib/" + "/usr/local/pgsql/lib/" "/usr/lib/pgsql/" + "/opt/pgsql/lib/pgsql") + :drive-letters '("C" "D" "E")))) + (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-sys:database-type-load-foreign :postgresql) -(when (clsql-sys:database-type-library-loaded :postgresql) - (clsql-sys:initialize-database-type :database-type :postgresql) - (pushnew :postgresql cl:*features*)) +