Header And Logo

PostgreSQL
| The world's most advanced open source database.

copy.h

Go to the documentation of this file.
00001 /*-------------------------------------------------------------------------
00002  *
00003  * copy.h
00004  *    Definitions for using the POSTGRES copy command.
00005  *
00006  *
00007  * Portions Copyright (c) 1996-2013, PostgreSQL Global Development Group
00008  * Portions Copyright (c) 1994, Regents of the University of California
00009  *
00010  * src/include/commands/copy.h
00011  *
00012  *-------------------------------------------------------------------------
00013  */
00014 #ifndef COPY_H
00015 #define COPY_H
00016 
00017 #include "nodes/execnodes.h"
00018 #include "nodes/parsenodes.h"
00019 #include "tcop/dest.h"
00020 
00021 /* CopyStateData is private in commands/copy.c */
00022 typedef struct CopyStateData *CopyState;
00023 
00024 extern Oid DoCopy(const CopyStmt *stmt, const char *queryString,
00025                   uint64 *processed);
00026 
00027 extern void ProcessCopyOptions(CopyState cstate, bool is_from, List *options);
00028 extern CopyState BeginCopyFrom(Relation rel, const char *filename,
00029               bool is_program, List *attnamelist, List *options);
00030 extern void EndCopyFrom(CopyState cstate);
00031 extern bool NextCopyFrom(CopyState cstate, ExprContext *econtext,
00032              Datum *values, bool *nulls, Oid *tupleOid);
00033 extern bool NextCopyFromRawFields(CopyState cstate,
00034                       char ***fields, int *nfields);
00035 extern void CopyFromErrorCallback(void *arg);
00036 
00037 extern DestReceiver *CreateCopyDestReceiver(void);
00038 
00039 #endif   /* COPY_H */