diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2011-02-20 14:06:59 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2011-02-20 14:06:59 -0500 |
commit | 7c5d0ae7078456bfeedb2103c45b9a32285c2631 (patch) | |
tree | 5f02dc38c3c57ab676b5d914f6e27be3259f3367 /src/include/commands/copy.h | |
parent | bb742407947ad1cbf19355d24282380d576e7654 (diff) |
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
Diffstat (limited to 'src/include/commands/copy.h')
-rw-r--r-- | src/include/commands/copy.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/include/commands/copy.h b/src/include/commands/copy.h index afe4b5e4501..7098a70c959 100644 --- a/src/include/commands/copy.h +++ b/src/include/commands/copy.h @@ -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); |