summaryrefslogtreecommitdiff
path: root/src/include/libpq/be-fsstubs.h
blob: beaddbc0b3fd4ca3fc26433d18fa162edb780da7 (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
/*-------------------------------------------------------------------------
 *
 * be-fsstubs.h
 *
 *
 *
 * Copyright (c) 1994, Regents of the University of California
 *
 * $Id: be-fsstubs.h,v 1.9 1999/05/31 22:53:58 tgl Exp $
 *
 *-------------------------------------------------------------------------
 */
#ifndef BE_FSSTUBS_H
#define BE_FSSTUBS_H

/* Redefine names LOread() and LOwrite() to be lowercase to allow calling
 *	using the new v6.1 case-insensitive SQL parser. Define macros to allow
 *	the existing code to stay the same. - tgl 97/05/03
 */

#define LOread(f,l) loread(f,l)
#define LOwrite(f,b) lowrite(f,b)

extern Oid	lo_import(text *filename);
extern int4 lo_export(Oid lobjId, text *filename);

extern Oid	lo_creat(int mode);

extern int	lo_open(Oid lobjId, int mode);
extern int	lo_close(int fd);
extern int	lo_read(int fd, char *buf, int len);
extern int	lo_write(int fd, char *buf, int len);
extern int	lo_lseek(int fd, int offset, int whence);
extern int	lo_tell(int fd);
extern int	lo_unlink(Oid lobjId);

extern struct varlena *loread(int fd, int len);
extern int	lowrite(int fd, struct varlena * wbuf);

/*
 * Added for buffer leak prevention [ Pascal André <andre@via.ecp.fr> ]
 */
extern void lo_commit(bool isCommit);

#endif	 /* BE_FSSTUBS_H */