mirror of
https://github.com/postgres/postgres.git
synced 2025-11-06 07:49:08 +03:00
Extend COPY to support COPY (SELECT ...) TO ...
Bernd Helmle
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.325 2006/08/25 04:06:56 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.326 2006/08/30 23:34:22 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1012,16 +1012,22 @@ typedef struct GrantRoleStmt
|
||||
|
||||
/* ----------------------
|
||||
* Copy Statement
|
||||
*
|
||||
* We support "COPY relation FROM file", "COPY relation TO file", and
|
||||
* "COPY (query) TO file". In any given CopyStmt, exactly one of "relation"
|
||||
* and "query" must be non-NULL. Note: "query" is a SelectStmt before
|
||||
* parse analysis, and a Query afterwards.
|
||||
* ----------------------
|
||||
*/
|
||||
typedef struct CopyStmt
|
||||
{
|
||||
NodeTag type;
|
||||
RangeVar *relation; /* the relation to copy */
|
||||
Query *query; /* the query to copy */
|
||||
List *attlist; /* List of column names (as Strings), or NIL
|
||||
* for all columns */
|
||||
bool is_from; /* TO or FROM */
|
||||
char *filename; /* if NULL, use stdin/stdout */
|
||||
char *filename; /* filename, or NULL for STDIN/STDOUT */
|
||||
List *options; /* List of DefElem nodes */
|
||||
} CopyStmt;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user