1996-07-09 08:22:35 +02:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
1999-02-14 00:22:53 +01:00
|
|
|
* copy.h
|
1997-09-07 07:04:48 +02:00
|
|
|
* Definitions for using the POSTGRES copy command.
|
1996-07-09 08:22:35 +02:00
|
|
|
*
|
|
|
|
*
|
2011-01-01 19:18:15 +01:00
|
|
|
* Portions Copyright (c) 1996-2011, PostgreSQL Global Development Group
|
2000-01-26 06:58:53 +01:00
|
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
1996-07-09 08:22:35 +02:00
|
|
|
*
|
2010-09-20 22:08:53 +02:00
|
|
|
* src/include/commands/copy.h
|
1996-07-09 08:22:35 +02:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
#ifndef COPY_H
|
1997-09-07 07:04:48 +02:00
|
|
|
#define COPY_H
|
1996-07-09 08:22:35 +02:00
|
|
|
|
2011-02-16 03:19:11 +01:00
|
|
|
#include "nodes/execnodes.h"
|
2002-03-29 20:06:29 +01:00
|
|
|
|
2011-02-20 20:06:59 +01:00
|
|
|
/* CopyStateData is private in commands/copy.c */
|
|
|
|
typedef struct CopyStateData *CopyState;
|
2011-02-16 03:19:11 +01:00
|
|
|
|
2007-03-13 01:33:44 +01:00
|
|
|
extern uint64 DoCopy(const CopyStmt *stmt, const char *queryString);
|
2001-10-28 07:26:15 +01:00
|
|
|
|
2011-02-20 20:06:59 +01:00
|
|
|
extern void ProcessCopyOptions(CopyState cstate, bool is_from, List *options);
|
2011-02-16 03:19:11 +01:00
|
|
|
extern CopyState BeginCopyFrom(Relation rel, const char *filename,
|
2011-04-10 17:42:00 +02:00
|
|
|
List *attnamelist, List *options);
|
2011-02-16 03:19:11 +01:00
|
|
|
extern void EndCopyFrom(CopyState cstate);
|
|
|
|
extern bool NextCopyFrom(CopyState cstate, ExprContext *econtext,
|
2011-04-10 17:42:00 +02:00
|
|
|
Datum *values, bool *nulls, Oid *tupleOid);
|
2011-02-16 03:19:11 +01:00
|
|
|
extern bool NextCopyFromRawFields(CopyState cstate,
|
2011-04-10 17:42:00 +02:00
|
|
|
char ***fields, int *nfields);
|
2011-02-16 03:19:11 +01:00
|
|
|
extern void CopyFromErrorCallback(void *arg);
|
|
|
|
|
2006-08-31 01:34:22 +02:00
|
|
|
extern DestReceiver *CreateCopyDestReceiver(void);
|
|
|
|
|
2001-11-05 18:46:40 +01:00
|
|
|
#endif /* COPY_H */
|