aboutsummaryrefslogtreecommitdiff
path: root/src/backend/rewrite/rewriteHandler.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2002-07-18 04:43:51 +0000
committerBruce Momjian <bruce@momjian.us>2002-07-18 04:43:51 +0000
commita90db34b542d9f31582627a0bfa43901811b84b2 (patch)
treee0ac399fd5a3caddd24ac8c82d24a37deee4305a /src/backend/rewrite/rewriteHandler.c
parentfc5372e09930766f3559555e19262b4b861f3646 (diff)
downloadpostgresql-a90db34b542d9f31582627a0bfa43901811b84b2.tar.gz
postgresql-a90db34b542d9f31582627a0bfa43901811b84b2.zip
The attached patch (against HEAD) implements
COPY x (a,d,c,b) from stdin; COPY x (a,c) to stdout; as well as the corresponding changes to pg_dump to use the new functionality. This functionality is not available when using the BINARY option. If a column is not specified in the COPY FROM statement, its default values will be used. In addition to this functionality, I tweaked a couple of the error messages emitted by the new COPY <options> checks. Brent Verner
Diffstat (limited to 'src/backend/rewrite/rewriteHandler.c')
-rw-r--r--src/backend/rewrite/rewriteHandler.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/backend/rewrite/rewriteHandler.c b/src/backend/rewrite/rewriteHandler.c
index ae199d51ce8..0ae1e223baa 100644
--- a/src/backend/rewrite/rewriteHandler.c
+++ b/src/backend/rewrite/rewriteHandler.c
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteHandler.c,v 1.103 2002/06/20 20:29:34 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteHandler.c,v 1.104 2002/07/18 04:43:50 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -43,7 +43,6 @@ static List *adjustJoinTreeList(Query *parsetree, bool removert, int rt_index);
static void rewriteTargetList(Query *parsetree, Relation target_relation);
static TargetEntry *process_matched_tle(TargetEntry *src_tle,
TargetEntry *prior_tle);
-static Node *build_column_default(Relation rel, int attrno);
static void markQueryForUpdate(Query *qry, bool skipOldNew);
static List *matchLocks(CmdType event, RuleLock *rulelocks,
int varno, Query *parsetree);
@@ -411,7 +410,7 @@ process_matched_tle(TargetEntry *src_tle,
*
* If there is no default, return a NULL instead.
*/
-static Node *
+Node *
build_column_default(Relation rel, int attrno)
{
TupleDesc rd_att = rel->rd_att;