]> granicus.if.org Git - postgresql/blob - src/interfaces/odbc/lobj.h
Version 06-30-0248
[postgresql] / src / interfaces / odbc / lobj.h
1
2 /* File:            lobj.h
3  *
4  * Description:     See "lobj.c"
5  *
6  * Comments:        See "notice.txt" for copyright and license information.
7  *
8  */
9
10 #ifndef __LOBJ_H__
11 #define __LOBJ_H__
12
13
14 #include "psqlodbc.h"
15
16 struct lo_arg {
17         int             isint;
18         int             len;
19         union
20         {
21                 int             integer;
22                 char    *ptr;
23         } u;
24 };
25
26 #define LO_CREAT                957
27 #define LO_OPEN                 952
28 #define LO_CLOSE                953
29 #define LO_READ                 954
30 #define LO_WRITE                955
31 #define LO_LSEEK                956
32 #define LO_TELL                 958
33 #define LO_UNLINK               964
34
35 #define INV_WRITE               0x00020000
36 #define INV_READ                0x00040000
37
38 Oid lo_creat(ConnectionClass *conn, int mode);
39 int lo_open(ConnectionClass *conn, int lobjId, int mode);
40 int lo_close(ConnectionClass *conn, int fd);
41 int lo_read(ConnectionClass *conn, int fd, char *buf, int len);
42 int lo_write(ConnectionClass *conn, int fd, char *buf, int len);
43 int lo_lseek(ConnectionClass *conn, int fd, int offset, int len);
44 int lo_tell(ConnectionClass *conn, int fd);
45 int lo_unlink(ConnectionClass *conn, Oid lobjId);
46
47 #endif
48