|
6 | 6 | *
|
7 | 7 | *
|
8 | 8 | * IDENTIFICATION
|
9 |
| - * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.23 1997/04/02 03:57:03 vadim Exp $ |
| 9 | + * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.24 1997/06/12 15:39:44 vadim Exp $ |
10 | 10 | *
|
11 | 11 | *-------------------------------------------------------------------------
|
12 | 12 | */
|
@@ -327,7 +327,7 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
|
327 | 327 | #endif
|
328 | 328 | intnatts;
|
329 | 329 | AttrNumber*attnumP;
|
330 |
| -Datumidatum; |
| 330 | +Datum*idatum; |
331 | 331 | intn_indices;
|
332 | 332 | InsertIndexResultindexRes;
|
333 | 333 | TupleDesctupDesc;
|
@@ -438,6 +438,7 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
|
438 | 438 | values= (Datum*)palloc(sizeof(Datum)*attr_count);
|
439 | 439 | nulls= (char*)palloc(attr_count);
|
440 | 440 | index_nulls= (char*)palloc(attr_count);
|
| 441 | +idatum= (Datum*)palloc(sizeof(Datum)*attr_count); |
441 | 442 | byval= (bool*)palloc(attr_count*sizeof(bool));
|
442 | 443 |
|
443 | 444 | for (i=0;i<attr_count;i++) {
|
@@ -619,10 +620,10 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
|
619 | 620 | tuple,
|
620 | 621 | tupDesc,
|
621 | 622 | InvalidBuffer,
|
622 |
| -&idatum, |
| 623 | +idatum, |
623 | 624 | index_nulls,
|
624 | 625 | finfoP[i]);
|
625 |
| -indexRes=index_insert(index_rels[i],&idatum,index_nulls, |
| 626 | +indexRes=index_insert(index_rels[i],idatum,index_nulls, |
626 | 627 | &(tuple->t_ctid),rel);
|
627 | 628 | if (indexRes)pfree(indexRes);
|
628 | 629 | }
|
|