Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf4ad5e8

Browse files
committed
Clean up leftover bugs from recent COPY feature patch --- missed
required changes to copyfuncs/equalfuncs.
1 parent5f6a27f commitf4ad5e8

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

‎src/backend/commands/copy.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.163 2002/08/15 16:36:02 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.164 2002/08/19 00:40:14 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -1513,7 +1513,7 @@ CopyGetAttnums(Relation rel, List *attnamelist)
15131513

15141514
foreach(l,attnamelist)
15151515
{
1516-
char*name=strVal(lfirst(l));
1516+
char*name=((Ident*)lfirst(l))->name;
15171517
intattnum;
15181518

15191519
/* Lookup column name, elog on failure */

‎src/backend/nodes/copyfuncs.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* Portions Copyright (c) 1994, Regents of the University of California
1616
*
1717
* IDENTIFICATION
18-
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.202 2002/08/19 00:11:53 tgl Exp $
18+
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.203 2002/08/19 00:40:14 tgl Exp $
1919
*
2020
*-------------------------------------------------------------------------
2121
*/
@@ -2016,6 +2016,7 @@ _copyCopyStmt(CopyStmt *from)
20162016
CopyStmt*newnode=makeNode(CopyStmt);
20172017

20182018
Node_Copy(from,newnode,relation);
2019+
Node_Copy(from,newnode,attlist);
20192020
newnode->is_from=from->is_from;
20202021
if (from->filename)
20212022
newnode->filename=pstrdup(from->filename);

‎src/backend/nodes/equalfuncs.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
* Portions Copyright (c) 1994, Regents of the University of California
2121
*
2222
* IDENTIFICATION
23-
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.151 2002/08/19 00:11:53 tgl Exp $
23+
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.152 2002/08/19 00:40:14 tgl Exp $
2424
*
2525
*-------------------------------------------------------------------------
2626
*/
@@ -801,6 +801,8 @@ _equalCopyStmt(CopyStmt *a, CopyStmt *b)
801801
{
802802
if (!equal(a->relation,b->relation))
803803
return false;
804+
if (!equal(a->attlist,b->attlist))
805+
return false;
804806
if (a->is_from!=b->is_from)
805807
return false;
806808
if (!equalstr(a->filename,b->filename))

‎src/include/nodes/parsenodes.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $Id: parsenodes.h,v 1.199 2002/08/15 16:36:07 momjian Exp $
10+
* $Id: parsenodes.h,v 1.200 2002/08/19 00:40:15 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -869,7 +869,7 @@ typedef struct CopyStmt
869869
{
870870
NodeTagtype;
871871
RangeVar*relation;/* the relation to copy */
872-
List*attlist;
872+
List*attlist;/* List of Ident nodes, or NIL for all */
873873
boolis_from;/* TO or FROM */
874874
char*filename;/* if NULL, use stdin/stdout */
875875
List*options;/* List of DefElem nodes */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp