<!--
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/lisp.sgml,v 2.4 2000/12/22 21:51:58 petere Exp $
-->

 <chapter id="lisp">
  <title id="lisp-title">Lisp Programming Interface</title>

  <abstract>
   <para>
    <filename>pg.el</filename> is a socket-level interface to
    <productname>Postgres</productname> for emacs.
   </para>
  </abstract>

  <note>
   <title>Author</title>
   <para>
    Written by Eric Marsden <email>emarsden@mail.dotcom.fr</email>
    on 1999-07-21
   </para>
  </note>

  <para>
   <filename>pg.el</filename> is a socket-level interface to
   <productname>Postgres</productname> 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.
  </para>

  <para>
   The code (version 0.2) is available under GNU GPL from
   <ulink url="http://www.chez.com/emarsden/downloads/pg.el">Eric Marsden</ulink>
  </para>

  <para>
Changes since last release:

   <itemizedlist mark="bullet" spacing="compact">
    <listitem>
     <para>
      now works with XEmacs (tested with Emacs 19.34 & 20.2, and XEmacs
      20.4)
     </para>
    </listitem>

    <listitem>
     <para>
      added functions to provide database metainformation (list of
      databases, of tables, of columns)
     </para>
    </listitem>

    <listitem>
     <para>
      arguments to `pg:result' are now :keywords
     </para>
    </listitem>

    <listitem>
     <para>
      MULE-resistant
     </para>
    </listitem>

    <listitem>
     <para>
      more self-testing code
     </para>
    </listitem>
   </itemizedlist>
  </para>

  <para>
   Please note that this is a programmer's API, and doesn't provide any
   form of user interface. Example:

   <programlisting>
 (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)))
   </programlisting>
  </para>
 </chapter>

<!-- Keep this comment at the end of the file
Local variables:
mode:sgml
sgml-omittag:nil
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:"./reference.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:("/usr/lib/sgml/catalog")
sgml-local-ecat-files:nil
End:
-->
