Commit 9392a191 authored by Vadim B. Mikheev's avatar Vadim B. Mikheev

Datum *idatum;

      ^
parent 9b22846e
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.23 1997/04/02 03:57:03 vadim Exp $ * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.24 1997/06/12 15:39:44 vadim Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -327,7 +327,7 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim) ...@@ -327,7 +327,7 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
#endif #endif
int natts; int natts;
AttrNumber *attnumP; AttrNumber *attnumP;
Datum idatum; Datum *idatum;
int n_indices; int n_indices;
InsertIndexResult indexRes; InsertIndexResult indexRes;
TupleDesc tupDesc; TupleDesc tupDesc;
...@@ -438,6 +438,7 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim) ...@@ -438,6 +438,7 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
values = (Datum *) palloc(sizeof(Datum) * attr_count); values = (Datum *) palloc(sizeof(Datum) * attr_count);
nulls = (char *) palloc(attr_count); nulls = (char *) palloc(attr_count);
index_nulls = (char *) palloc(attr_count); index_nulls = (char *) palloc(attr_count);
idatum = (Datum *) palloc(sizeof(Datum) * attr_count);
byval = (bool *) palloc(attr_count * sizeof(bool)); byval = (bool *) palloc(attr_count * sizeof(bool));
for (i = 0; i < attr_count; i++) { for (i = 0; i < attr_count; i++) {
...@@ -619,10 +620,10 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim) ...@@ -619,10 +620,10 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
tuple, tuple,
tupDesc, tupDesc,
InvalidBuffer, InvalidBuffer,
&idatum, idatum,
index_nulls, index_nulls,
finfoP[i]); finfoP[i]);
indexRes = index_insert(index_rels[i], &idatum, index_nulls, indexRes = index_insert(index_rels[i], idatum, index_nulls,
&(tuple->t_ctid), rel); &(tuple->t_ctid), rel);
if (indexRes) pfree(indexRes); if (indexRes) pfree(indexRes);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment