annotate src/postgresql.h @ 578:190b164ddcac

[xemacs-hg @ 2001-05-25 11:26:50 by ben] device-msw.c, eldap.c, emodules.c, hpplay.c, process-unix.c, sound.h, tooltalk.c, win32.c: Revert Martin's attempted compile-warnings fix. It does fix the warnings, but not the right way. We are trying to eliminate the raw use of `char' and `unsigned char' absolutely everywhere. There is never an occasion to reintroduce these. buffer.h: Instead, we fix these macros so they don't care about the type of their lvalues. We already do this for the non-C-string equivalents of these, and it's correct because it should be OK to pass in an SBufbyte *, for example. In any case, we do not need any type-correctness checking here -- errors will be caught for sure as soon as we remove the -Wno-sign-compare switch. mule-charset.c: Use invalid_argument, not generic signal_error (Qerror, ). alloc.c, chartab.c, console-gtk.c, console-msw.c, console-stream.c, console-stream.h, console-tty.c, console-tty.h, console-x.c, console.c, console.h, device-x.c, device.c, elhash.c, eval.c, faces.c, faces.h, fns.c, glyphs.c, glyphs.h, gui.c, gui.h, lisp.h, lread.c, nt.c, objects-gtk.c, objects-gtk.h, objects-msw.c, objects-tty.c, objects-x.c, objects.c, process-unix.c, rangetab.c, search.c, specifier.c, toolbar.c, window.c, window.h: Rename Error_behavior to Error_Behavior, to be consistent with general naming practices (Lisp_Object, Char_Binary, etc.).
author ben
date Fri, 25 May 2001 11:27:01 +0000
parents abe6d1db359e
children af57a77cbc92
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)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
38 #define PGCONNP(x) RECORDP (x, pgconn)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
39 #define CHECK_PGCONN(x) CHECK_RECORD (x, pgconn)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
40 #define CONCHECK_PGCONN(x) CONCHECK_RECORD (x, pgconn)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
41
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 /* 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
45 Lisp code.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
46 */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
47 struct Lisp_PGresult
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 lcrecord_header header;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
50 PGresult *pgresult;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
51 };
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
52 typedef struct Lisp_PGresult Lisp_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 DECLARE_LRECORD (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 #define XPGRESULT(x) XRECORD (x, pgresult, Lisp_PGresult)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
57 #define XSETPGRESULT(x, p) XSETRECORD (x, p, pgresult)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
58 #define PGRESULTP(x) RECORDP (x, pgresult)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
59 #define CHECK_PGRESULT(x) CHECK_RECORD (x, pgresult)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
60 #define CONCHECK_PGRESULT(x) CONCHECK_RECORD (x, pgresult)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
61
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
62 #endif /* INCLUDED_postgresql_h_ */