PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * copy.h
4  * Definitions for using the POSTGRES copy command.
5  *
6  *
7  * Portions Copyright (c) 1996-2017, 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
17 #include "nodes/execnodes.h"
18 #include "nodes/parsenodes.h"
19 #include "parser/parse_node.h"
20 #include "tcop/dest.h"
22 /* CopyStateData is private in commands/copy.c */
23 typedef struct CopyStateData *CopyState;
25 extern void DoCopy(ParseState *state, const CopyStmt *stmt,
26  int stmt_location, int stmt_len,
27  uint64 *processed);
29 extern void ProcessCopyOptions(ParseState *pstate, CopyState cstate, bool is_from, List *options);
30 extern CopyState BeginCopyFrom(ParseState *pstate, Relation rel, const char *filename,
31  bool is_program, List *attnamelist, List *options);
32 extern void EndCopyFrom(CopyState cstate);
33 extern bool NextCopyFrom(CopyState cstate, ExprContext *econtext,
34  Datum *values, bool *nulls, Oid *tupleOid);
35 extern bool NextCopyFromRawFields(CopyState cstate,
36  char ***fields, int *nfields);
37 extern void CopyFromErrorCallback(void *arg);
41 #endif /* COPY_H */
void EndCopyFrom(CopyState cstate)
Definition: copy.c:3419
CopyState BeginCopyFrom(ParseState *pstate, Relation rel, const char *filename, bool is_program, List *attnamelist, List *options)
Definition: copy.c:2877
unsigned int Oid
Definition: postgres_ext.h:31
bool NextCopyFrom(CopyState cstate, ExprContext *econtext, Datum *values, bool *nulls, Oid *tupleOid)
Definition: copy.c:3178
bool NextCopyFromRawFields(CopyState cstate, char ***fields, int *nfields)
Definition: copy.c:3126
Relation rel
Definition: copy.c:107
DestReceiver * CreateCopyDestReceiver(void)
Definition: copy.c:4729
bool is_program
Definition: copy.c:111
uintptr_t Datum
Definition: postgres.h:372
void DoCopy(ParseState *state, const CopyStmt *stmt, int stmt_location, int stmt_len, uint64 *processed)
Definition: copy.c:773
Definition: regguts.h:298
static Datum values[MAXATTR]
Definition: bootstrap.c:162
static char * filename
Definition: pg_dumpall.c:87
struct CopyStateData * CopyState
Definition: copy.h:23
void * arg
void ProcessCopyOptions(ParseState *pstate, CopyState cstate, bool is_from, List *options)
Definition: copy.c:1013
Definition: pg_list.h:45
void CopyFromErrorCallback(void *arg)
Definition: copy.c:2185