blob: e232749f68a16c4980c48509fec5fad3049d2d2c (
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
/*-------------------------------------------------------------------------
*
* be-fsstubs.h
*
*
*
* Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* src/include/libpq/be-fsstubs.h
*
*-------------------------------------------------------------------------
*/
#ifndef BE_FSSTUBS_H
#define BE_FSSTUBS_H
#include "fmgr.h"
/*
* LO functions available via pg_proc entries
*/
extern Datum be_lo_import(PG_FUNCTION_ARGS);
extern Datum be_lo_import_with_oid(PG_FUNCTION_ARGS);
extern Datum be_lo_export(PG_FUNCTION_ARGS);
extern Datum be_lo_creat(PG_FUNCTION_ARGS);
extern Datum be_lo_create(PG_FUNCTION_ARGS);
extern Datum be_lo_from_bytea(PG_FUNCTION_ARGS);
extern Datum be_lo_open(PG_FUNCTION_ARGS);
extern Datum be_lo_close(PG_FUNCTION_ARGS);
extern Datum be_loread(PG_FUNCTION_ARGS);
extern Datum be_lowrite(PG_FUNCTION_ARGS);
extern Datum be_lo_get(PG_FUNCTION_ARGS);
extern Datum be_lo_get_fragment(PG_FUNCTION_ARGS);
extern Datum be_lo_put(PG_FUNCTION_ARGS);
extern Datum be_lo_lseek(PG_FUNCTION_ARGS);
extern Datum be_lo_tell(PG_FUNCTION_ARGS);
extern Datum be_lo_lseek64(PG_FUNCTION_ARGS);
extern Datum be_lo_tell64(PG_FUNCTION_ARGS);
extern Datum be_lo_unlink(PG_FUNCTION_ARGS);
extern Datum be_lo_truncate(PG_FUNCTION_ARGS);
extern Datum be_lo_truncate64(PG_FUNCTION_ARGS);
/*
* compatibility option for access control
*/
extern bool lo_compat_privileges;
/*
* These are not fmgr-callable, but are available to C code.
* Probably these should have had the underscore-free names,
* but too late now...
*/
extern int lo_read(int fd, char *buf, int len);
extern int lo_write(int fd, const char *buf, int len);
/*
* Cleanup LOs at xact commit/abort
*/
extern void AtEOXact_LargeObject(bool isCommit);
extern void AtEOSubXact_LargeObject(bool isCommit, SubTransactionId mySubid,
SubTransactionId parentSubid);
#endif /* BE_FSSTUBS_H */
|