gooderp18绿色标准版
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 line
1.5KB

  1. /*-------------------------------------------------------------------------
  2. *
  3. * copy.h
  4. * Definitions for using the POSTGRES copy command.
  5. *
  6. *
  7. * Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group
  8. * Portions Copyright (c) 1994, Regents of the University of California
  9. *
  10. * src/include/commands/copy.h
  11. *
  12. *-------------------------------------------------------------------------
  13. */
  14. #ifndef COPY_H
  15. #define COPY_H
  16. #include "nodes/execnodes.h"
  17. #include "nodes/parsenodes.h"
  18. #include "parser/parse_node.h"
  19. #include "tcop/dest.h"
  20. /* CopyStateData is private in commands/copy.c */
  21. typedef struct CopyStateData *CopyState;
  22. typedef int (*copy_data_source_cb) (void *outbuf, int minread, int maxread);
  23. extern void DoCopy(ParseState *state, const CopyStmt *stmt,
  24. int stmt_location, int stmt_len,
  25. uint64 *processed);
  26. extern void ProcessCopyOptions(ParseState *pstate, CopyState cstate, bool is_from, List *options);
  27. extern CopyState BeginCopyFrom(ParseState *pstate, Relation rel, const char *filename,
  28. bool is_program, copy_data_source_cb data_source_cb, List *attnamelist, List *options);
  29. extern void EndCopyFrom(CopyState cstate);
  30. extern bool NextCopyFrom(CopyState cstate, ExprContext *econtext,
  31. Datum *values, bool *nulls);
  32. extern bool NextCopyFromRawFields(CopyState cstate,
  33. char ***fields, int *nfields);
  34. extern void CopyFromErrorCallback(void *arg);
  35. extern uint64 CopyFrom(CopyState cstate);
  36. extern DestReceiver *CreateCopyDestReceiver(void);
  37. #endif /* COPY_H */
上海开阖软件有限公司 沪ICP备12045867号-1