mirror of
https://github.com/postgres/postgres.git
synced 2025-10-19 15:49:24 +03:00
Add contrib/file_fdw foreign-data wrapper for reading files via COPY.
This is both very useful in its own right, and an important test case for the core FDW support. This commit includes a small refactoring of copy.c to expose its option checking code as a separately callable function. The original patch submission duplicated hundreds of lines of that code, which seemed pretty unmaintainable. Shigeru Hanada, reviewed by Itagaki Takahiro and Tom Lane
This commit is contained in:
@@ -18,11 +18,12 @@
|
||||
#include "nodes/parsenodes.h"
|
||||
#include "tcop/dest.h"
|
||||
|
||||
|
||||
typedef struct CopyStateData *CopyState;
|
||||
/* CopyStateData is private in commands/copy.c */
|
||||
typedef struct CopyStateData *CopyState;
|
||||
|
||||
extern uint64 DoCopy(const CopyStmt *stmt, const char *queryString);
|
||||
|
||||
extern void ProcessCopyOptions(CopyState cstate, bool is_from, List *options);
|
||||
extern CopyState BeginCopyFrom(Relation rel, const char *filename,
|
||||
List *attnamelist, List *options);
|
||||
extern void EndCopyFrom(CopyState cstate);
|
||||
|
Reference in New Issue
Block a user