mirror of
https://github.com/postgres/postgres.git
synced 2025-07-05 07:21:24 +03:00
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
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user