annotate src/postgresql.h @ 828:4ead1e0842f0

[xemacs-hg @ 2002-05-07 15:30:14 by stephent] error check warning <20020423105456.A1592@nemesis.ncsl.nist.gov>
author stephent
date Tue, 07 May 2002 15:30:18 +0000
parents e38acbeb1cae
children
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
647
b39c14581166 [xemacs-hg @ 2001-08-13 04:45:47 by ben]
ben
parents: 617
diff changeset
16 #define message message_ /* Yuck */
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
17 #include LIBPQ_FE_H_FILE /* main PostgreSQL header file */
647
b39c14581166 [xemacs-hg @ 2001-08-13 04:45:47 by ben]
ben
parents: 617
diff changeset
18 #undef message
442
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 #define BLCKSZ 8192 /* size of a default Postgres disk block */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
21 /*
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
22 This file contains the GCC bug workaround code for the private
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
23 LRECORD types.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
24 */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
25
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
26 /* 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
27 Lisp code because libpq supports multiple connections.
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 Lisp_PGconn
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
30 {
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
31 struct lcrecord_header header;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
32 PGconn *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 typedef struct Lisp_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 DECLARE_LRECORD (pgconn, Lisp_PGconn);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
37
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
38 #define XPGCONN(x) XRECORD (x, pgconn, Lisp_PGconn)
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
39 #define wrap_pgconn(p) wrap_record (p, pgconn)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
40 #define PGCONNP(x) RECORDP (x, pgconn)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
41 #define CHECK_PGCONN(x) CHECK_RECORD (x, pgconn)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
42 #define CONCHECK_PGCONN(x) CONCHECK_RECORD (x, pgconn)
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
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
46 /* 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
47 Lisp code.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
48 */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
49 struct Lisp_PGresult
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
50 {
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
51 struct lcrecord_header header;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
52 PGresult *pgresult;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
53 };
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
54 typedef struct Lisp_PGresult Lisp_PGresult;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
55
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
56 DECLARE_LRECORD (pgresult, Lisp_PGresult);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
57
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
58 #define XPGRESULT(x) XRECORD (x, pgresult, Lisp_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_ */