 <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
    <ulink url="mailto:emarsden@mail.dotcom.fr">Eric Marsden</ulink>
    on 21 Jul 1999.
   </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">
    http://www.chez.com/emarsden/downloads/pg.el</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:
-->
