X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=db-postgresql%2Fpostgresql-loader.cl;fp=db-postgresql%2Fpostgresql-loader.cl;h=0000000000000000000000000000000000000000;hb=7d50938ba2db52a713498e49aa1679deae6f0b6b;hp=ac1729b86953d583c8e25e795bc7249bd7d75827;hpb=998937376fa6f9ce29bd3c7954fb0ebca91c37d7;p=clsql.git diff --git a/db-postgresql/postgresql-loader.cl b/db-postgresql/postgresql-loader.cl deleted file mode 100644 index ac1729b..0000000 --- a/db-postgresql/postgresql-loader.cl +++ /dev/null @@ -1,52 +0,0 @@ -;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*- -;;;; ************************************************************************* -;;;; FILE IDENTIFICATION -;;;; -;;;; Name: postgresql-loader.sql -;;;; Purpose: PostgreSQL library loader using UFFI -;;;; Programmer: Kevin M. Rosenberg -;;;; Date Started: Feb 2002 -;;;; -;;;; $Id: postgresql-loader.cl,v 1.1 2002/09/18 07:43:41 kevin Exp $ -;;;; -;;;; 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 -;;;; as governed by the terms of the Lisp Lesser GNU Public License -;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL. -;;;; ************************************************************************* - -(declaim (optimize (debug 3) (speed 3) (safety 1) (compilation-speed 0))) -(in-package :postgresql) - - -(defvar *postgresql-supporting-libraries* '("crypt" "c") - "Used only by CMU. List of library flags needed to be passed to ld to -load the PostgresSQL client library succesfully. If this differs at your site, -set to the right path before compiling or loading the system.") - -(defvar *postgresql-library-loaded* nil - "T if foreign library was able to be loaded successfully") - -(defmethod clsql-base-sys:database-type-library-loaded ((database-type - (eql :postgresql))) - *postgresql-library-loaded*) - -(defmethod clsql-base-sys:database-type-load-foreign ((database-type - (eql :postgresql))) - (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-base-sys:database-type-load-foreign :postgresql) -