aboutsummaryrefslogtreecommitdiff
path: root/doc/src/sgml/lisp.sgml
blob: 8de2c5ed3f719d29ada361641c354239da3e3697 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<!--
$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:
-->