Received: from localhost (IDENT:root@hectic-1.jpl.nasa.gov [128.149.68.203]) by hub.org (8.9.3/8.9.3) with ESMTP id VAA31842 for ; Wed, 21 Jul 1999 21:47:38 -0400 (EDT) (envelope-from lockhart@alumni.caltech.edu) Received: from alumni.caltech.edu (lockhart@localhost [127.0.0.1]) by localhost (8.8.7/8.8.7) with ESMTP id RAA15526; Wed, 21 Jul 1999 17:05:47 GMT Sender: lockhart@hub.org Message-ID: <3795FDEB.593D1063@alumni.caltech.edu> Date: Wed, 21 Jul 1999 17:05:47 +0000 From: Thomas Lockhart X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.36 i686) X-Accept-Language: en MIME-Version: 1.0 To: Eric Marsden CC: pgsql-interfaces@postgreSQL.org Subject: Re: [ANN] pg.el v0.2 -- Emacs Lisp interface to PostgreSQL References: <3795D0D4.6B9A8622@alumni.caltech.edu> Content-Type: multipart/mixed; boundary="------------897A4004F9196294951A0994" This is a multi-part message in MIME format. --------------897A4004F9196294951A0994 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit > tl> 1) it looks lisp-y, but I didn't look very closely; how much > tl> does this code resemble that for other lisp packages such as > tl> Allegro? > I assume you mean other "lisp implementations such as Allegro Common > Lisp"? The answer is that I have also written a Common Lisp version > (actually I wrote the CL version first), and a Scheme version > (Scheme is another language in the Lisp family), but given that there > is no standard interface to sockets in either Common Lisp or Scheme, > the code is implementation-specific. Would the CL version be available for the Postgres source tree? It could form a basis for a generic implementation (with, of course, some socket-specific stuff). > tl> 2) you are distributing it under GPL. No problem with that, but > tl> if you were amenable to distributing under a BSD-style license > tl> we could include it in the main Postgres distribution. Is that a > tl> possibility? It would be nice to have the foundation for another > tl> language interface for folks to work with. > this may be a little tricky. pg.el will probably be distributed with > Emacs in the future, and thus I will have to assign copyright to the > FSF. I will talk with rms about that. Does that mean that even for > client code which is intended to run completely independently from the > backend, it is not possible to mix BSD and GNU GPL code? The Common > Lisp and Scheme implementations, however, are under GNU LGPL, and I > have no problem releasing them under another licence. The "license mixing" issue has been a source of confusion for everyone. I think that up until now we have tried to keep everything BSD-ish, to avoid having misinterpreted the GPL and hence somehow unintentionally applying it to the rest of our source tree. As I'm sure you have seen elsewhere, the discussion on this is always long, convoluted, and inconclusive. Perhaps your CL version is a more appropriate piece of code to put in our tree, especially if the licensing for that could be worked out separately. If the emacs version is available in other "standard places" then that should be good enough. > tl> Thanks again for the code. If the url you published is a good > tl> long-term reference, then I'll add your introductory mail > tl> message to the docs. > give me a few days and I'll write a special page for it. Thanks. If you want to start with this... ;) - Thomas -- Thomas Lockhart lockhart@alumni.caltech.edu South Pasadena, California --------------897A4004F9196294951A0994 Content-Type: text/html; charset=us-ascii; name="lisp.sgml" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="lisp.sgml" Lisp Programming Interface pg.el is a socket-level interface to Postgres for emacs. Author Written by Eric Marsden on 21 Jul 1999. pg.el is a socket-level interface to Postgres for emacs (text editor extraordinaire). The module is capable of type coercions from a range of SQL types to the equivalent Emacs Lisp type. It currently supports neither crypt or Kerberos authentication, nor large objects. The code (version 0.2) is available under GNU GPL from http://www.chez.com/emarsden/downloads/pg.el Changes since last release: now works with XEmacs (tested with Emacs 19.34 & 20.2, and XEmacs 20.4) added functions to provide database metainformation (list of databases, of tables, of columns) arguments to `pg:result' are now :keywords MULE-resistant more self-testing code Please note that this is a programmer's API, and doesn't provide any form of user interface. Example: (defun demo () (interactive) (let* ((conn (pg:connect "template1" "postgres" "postgres")) (res (pg:exec conn "SELECT * from scshdemo WHERE a = 42"))) (message "status is %s" (pg:result res :status)) (message "metadata is %s" (pg:result res :attributes)) (message "data is %s" (pg:result res :tuples)) (pg:disconnect conn))) --------------897A4004F9196294951A0994--