pg-dot-lisp

A Common Lisp interface to the PostgreSQL database

Introduction

pg-dot-lisp is a socket-level interface to the PostgreSQL object-relational DBMS. It implements the client part of the frontend/backend protocol, rather than providing an FFI wrapper around the libpq library.

Features:

Licence: pg-dot-lisp is distributed under the terms of the GNU LGPL.

Sample code:

   (with-pg-connection (conn "testdb" "login" :host "dbhost" :password "secret")
      (with-pg-transaction conn
         (when (member "test_date" (pg-tables conn) :test #'string=)
            (pg-exec "DROP TABLE test_date"))
         (pg-exec conn "CREATE TABLE test_date(a timestamp, b abstime, c time, d date)")
         (pg-exec conn "INSERT INTO test_date VALUES "
                       "(current_timestamp, 'now', 'now', 'now')")))
 

Mailing Lists

Download

You can browse the CVS repository, or download a cvs snapshot in tarfile format. To checkout from CVS:

export CVSROOT=:pserver:anonymous@common-lisp.net:/project/pg/cvsroot
cvs login 
(Enter anonymous when prompted for the password)
cvs checkout pg
Valid XHTML 1.0 Strict