Re: [GENERAL] COPY: row is too big - Mailing list pgsql-general

From Tom Lane
Subject Re: [GENERAL] COPY: row is too big
Date
Msg-id 29930.1495808462@sss.pgh.pa.us
Whole thread Raw
In response to Re: [GENERAL] COPY: row is too big  (doganmeh <mehmet@edgle.com>)
List pgsql-general
doganmeh <mehmet@edgle.com> writes:
> I tried varchar(12) also, nothing changed. My questions is 1) I have
> 672x12=8,064 characters in the first row (which are actually the headers),
> why would it complain that it is 8760.

No, you have 672*13, because each varchar value will require a length
word (which is only 1 byte for short values like these).  Adding the
24-byte row header comes to 8760.

> 2) Is there anything I can do to work
> around this situation?

Maybe you could combine the strings into an array?  A large array would
be subject to compression and/or out-of-line storage, but 12-byte fields
are too small to benefit from either.

            regards, tom lane


pgsql-general by date:

Previous
From: Andreas Kretschmer
Date:
Subject: Re: [GENERAL] COPY: row is too big
Next
From: David Wall
Date:
Subject: Re: [GENERAL] pg_dump 8.3.3 ERROR: invalid page header in block2264419 of relation "pg_largeobject"