1 /*------------------------------------------------------------------------- 2 * 3 * be-fsstubs.h 4 * 5 * 6 * 7 * Portions Copyright (c) 1996-2013, PostgreSQL Global Development Group 8 * Portions Copyright (c) 1994, Regents of the University of California 9 * 10 * src/include/libpq/be-fsstubs.h 11 * 12 *------------------------------------------------------------------------- 13 */ 14 #ifndef BE_FSSTUBS_H 15 #define BE_FSSTUBS_H 16 17 #include "fmgr.h" 18 19 /* 20 * LO functions available via pg_proc entries 21 */ 22 extern Datum lo_import(PG_FUNCTION_ARGS); 23 extern Datum lo_import_with_oid(PG_FUNCTION_ARGS); 24 extern Datum lo_export(PG_FUNCTION_ARGS); 25 26 extern Datum lo_creat(PG_FUNCTION_ARGS); 27 extern Datum lo_create(PG_FUNCTION_ARGS); 28 29 extern Datum lo_open(PG_FUNCTION_ARGS); 30 extern Datum lo_close(PG_FUNCTION_ARGS); 31 32 extern Datum loread(PG_FUNCTION_ARGS); 33 extern Datum lowrite(PG_FUNCTION_ARGS); 34 35 extern Datum lo_lseek(PG_FUNCTION_ARGS); 36 extern Datum lo_tell(PG_FUNCTION_ARGS); 37 extern Datum lo_lseek64(PG_FUNCTION_ARGS); 38 extern Datum lo_tell64(PG_FUNCTION_ARGS); 39 extern Datum lo_unlink(PG_FUNCTION_ARGS); 40 extern Datum lo_truncate(PG_FUNCTION_ARGS); 41 extern Datum lo_truncate64(PG_FUNCTION_ARGS); 42 43 /* 44 * compatibility option for access control 45 */ 46 extern bool lo_compat_privileges; 47 48 /* 49 * These are not fmgr-callable, but are available to C code. 50 * Probably these should have had the underscore-free names, 51 * but too late now... 52 */ 53 extern int lo_read(int fd, char *buf, int len); 54 extern int lo_write(int fd, const char *buf, int len); 55 56 /* 57 * Cleanup LOs at xact commit/abort 58 */ 59 extern void AtEOXact_LargeObject(bool isCommit); 60 extern void AtEOSubXact_LargeObject(bool isCommit, SubTransactionId mySubid, 61 SubTransactionId parentSubid); 62 63 #endif /* BE_FSSTUBS_H */ 64