annotate src/postgresql.h @ 646:00c54252fe4f

[xemacs-hg @ 2001-08-08 12:15:04 by didierv] autoload.el: handle the case of `define-derived-mode'.
author didierv
date Wed, 08 Aug 2001 12:15:04 +0000
parents af57a77cbc92
children b39c14581166
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
1 /*
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
2 postgresql.h -- Emacs Lisp binding to libpq.so
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
3 Copyright (C) 2000 Electrotechnical Laboratory, JAPAN.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
4 Licensed to the Free Software Foundation.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
5
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
6 Author: SL Baur <steve@beopen.com>
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
7 Maintainer: SL Baur <steve@beopen.com>
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
8
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
9 Please send patches to this file to me first before submitting them to
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
10 xemacs-patches.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
11 */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
12
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
13 #ifndef INCLUDED_postgresql_h_
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
14 #define INCLUDED_postgresql_h_ 1
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
15
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
16 #include LIBPQ_FE_H_FILE /* main PostgreSQL header file */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
17
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
18 #define BLCKSZ 8192 /* size of a default Postgres disk block */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
19 /*
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
20 This file contains the GCC bug workaround code for the private
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
21 LRECORD types.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
22 */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
23
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
24 /* PGconn is an opaque object and we need to be able to store them in
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
25 Lisp code because libpq supports multiple connections.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
26 */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
27 struct Lisp_PGconn
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
28 {
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
29 struct lcrecord_header header;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
30 PGconn *pgconn;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
31 };
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
32 typedef struct Lisp_PGconn Lisp_PGconn;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
33
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
34 DECLARE_LRECORD (pgconn, Lisp_PGconn);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
35
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
36 #define XPGCONN(x) XRECORD (x, pgconn, Lisp_PGconn)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
37 #define XSETPGCONN(x, p) XSETRECORD (x, p, pgconn)
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
38 #define wrap_pgconn(p) wrap_record (p, pgconn)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
39 #define PGCONNP(x) RECORDP (x, pgconn)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
40 #define CHECK_PGCONN(x) CHECK_RECORD (x, pgconn)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
41 #define CONCHECK_PGCONN(x) CONCHECK_RECORD (x, pgconn)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
42
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
43 /****/
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
44
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
45 /* PGresult is an opaque object and we need to be able to store them in
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
46 Lisp code.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
47 */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
48 struct Lisp_PGresult
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
49 {
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
50 struct lcrecord_header header;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
51 PGresult *pgresult;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
52 };
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
53 typedef struct Lisp_PGresult Lisp_PGresult;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
54
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
55 DECLARE_LRECORD (pgresult, Lisp_PGresult);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
56
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
57 #define XPGRESULT(x) XRECORD (x, pgresult, Lisp_PGresult)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
58 #define XSETPGRESULT(x, p) XSETRECORD (x, p, pgresult)
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
59 #define wrap_pgresult(p) wrap_record (p, pgresult)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
60 #define PGRESULTP(x) RECORDP (x, pgresult)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
61 #define CHECK_PGRESULT(x) CHECK_RECORD (x, pgresult)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
62 #define CONCHECK_PGRESULT(x) CONCHECK_RECORD (x, pgresult)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
63
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
64 #endif /* INCLUDED_postgresql_h_ */