Skip to content

Commit 2077ce1

Browse files
committed
Fix for COPY problem and atttypmod.
1 parent 3654907 commit 2077ce1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/backend/commands/copy.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
*
88
* IDENTIFICATION
9-
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.48 1998/07/12 21:29:14 momjian Exp $
9+
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.49 1998/07/15 18:53:40 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -231,7 +231,7 @@ CopyTo(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
231231
{
232232
out_functions = (FmgrInfo *) palloc(attr_count * sizeof(FmgrInfo));
233233
elements = (Oid *) palloc(attr_count * sizeof(Oid));
234-
typmod = (int32 *) palloc(attr_count * sizeof(int16));
234+
typmod = (int32 *) palloc(attr_count * sizeof(int32));
235235
for (i = 0; i < attr_count; i++)
236236
{
237237
out_func_oid = (Oid) GetOutputFunction(attr[i]->atttypid);
@@ -499,7 +499,7 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
499499
{
500500
in_functions = (FmgrInfo *) palloc(attr_count * sizeof(FmgrInfo));
501501
elements = (Oid *) palloc(attr_count * sizeof(Oid));
502-
typmod = (int32 *) palloc(attr_count * sizeof(int16));
502+
typmod = (int32 *) palloc(attr_count * sizeof(int32));
503503
for (i = 0; i < attr_count; i++)
504504
{
505505
in_func_oid = (Oid) GetInputFunction(attr[i]->atttypid);

0 commit comments

Comments
 (0)