be-fsstubs.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*-------------------------------------------------------------------------
  2. *
  3. * be-fsstubs.h
  4. *
  5. *
  6. *
  7. * Portions Copyright (c) 1996-2016, 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. #include "fmgr.h"
  17. /*
  18. * LO functions available via pg_proc entries
  19. */
  20. extern Datum lo_import(PG_FUNCTION_ARGS);
  21. extern Datum lo_import_with_oid(PG_FUNCTION_ARGS);
  22. extern Datum lo_export(PG_FUNCTION_ARGS);
  23. extern Datum lo_creat(PG_FUNCTION_ARGS);
  24. extern Datum lo_create(PG_FUNCTION_ARGS);
  25. extern Datum lo_from_bytea(PG_FUNCTION_ARGS);
  26. extern Datum lo_open(PG_FUNCTION_ARGS);
  27. extern Datum lo_close(PG_FUNCTION_ARGS);
  28. extern Datum loread(PG_FUNCTION_ARGS);
  29. extern Datum lowrite(PG_FUNCTION_ARGS);
  30. extern Datum lo_get(PG_FUNCTION_ARGS);
  31. extern Datum lo_get_fragment(PG_FUNCTION_ARGS);
  32. extern Datum lo_put(PG_FUNCTION_ARGS);
  33. extern Datum lo_lseek(PG_FUNCTION_ARGS);
  34. extern Datum lo_tell(PG_FUNCTION_ARGS);
  35. extern Datum lo_lseek64(PG_FUNCTION_ARGS);
  36. extern Datum lo_tell64(PG_FUNCTION_ARGS);
  37. extern Datum lo_unlink(PG_FUNCTION_ARGS);
  38. extern Datum lo_truncate(PG_FUNCTION_ARGS);
  39. extern Datum lo_truncate64(PG_FUNCTION_ARGS);
  40. /*
  41. * compatibility option for access control
  42. */
  43. extern bool lo_compat_privileges;
  44. /*
  45. * These are not fmgr-callable, but are available to C code.
  46. * Probably these should have had the underscore-free names,
  47. * but too late now...
  48. */
  49. extern int lo_read(int fd, char *buf, int len);
  50. extern int lo_write(int fd, const char *buf, int len);
  51. /*
  52. * Cleanup LOs at xact commit/abort
  53. */
  54. extern void AtEOXact_LargeObject(bool isCommit);
  55. extern void AtEOSubXact_LargeObject(bool isCommit, SubTransactionId mySubid,
  56. SubTransactionId parentSubid);
  57. #endif /* BE_FSSTUBS_H */